PHP + Oracle long fields

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Prae
Forum Newbie
Posts: 1
Joined: Tue Jul 26, 2005 7:48 am

PHP + Oracle long fields

Post by Prae »

Hi everyone,

I've come across a problem which baffles me completely.
I'm trying to build a website for managing multi-language texts on a website.
The idea was to have the english text on the left side, and the other language on the right side.

The texts are stored as "long"-fields in an Oracle 9 database. I know LONG-fields are outdated, but it's an old database and conversion is out of the question. Up until now, we've never had any issues with LONG-fields. However, we've never had to select more than 1 LONG-field at a time either...

The thing that troubles me is as follows:

It seems that when you select two LONG-fields in one query using PHP, PHP freaks out and outputs a lot of garbage. I've made an example case to illustrate this. Additional note: In the example I select the same LONG field twice, selecting different LONG-fields from different tables does not fix the issue. Therefor I have made the example as small and clear as I could.

I've made screencaps for illustration, since I could not make the code publicly available. I hope this is clear enough for everyone.

Selecting one long field:
Image

Selecting two long fields:
Image


Has anyone encountered anything like this before? I'm at a total loss at the moment. The only other solution I can see is making two separate queries and putting the values in arrays and then loop through the arrays.

Any suggestions?
theda
Forum Contributor
Posts: 332
Joined: Sat Feb 19, 2005 8:35 am
Location: USA

Post by theda »

I'm just a novice, and know nothing of Oracle, but that seems like it opened an unsupported file. If you've ever tried to open an image filetype that just didn't exist, you'd get gibberish like that. Maybe unrelated, but still... I felt like posting ^_^;
Post Reply