Hi
I'm pretty sure that I am making a v.stupid error here with what I am doing - so over to you guys to help out.
I am using PHP with Interbase enabled and have enabled all three of the smart_quotes options in the php.ini file.
phpinfo() confirms that all three options are enabled.
The platform is PHP 4.2.2 on RedHat 9.
Now my database (Firebird 1.0 on RedHat 9) has the following info in the row.
INSERT INTO TRACK (TRACKNAME,ARTIST)
VALUES (I Think I'm Paranoid,Garbage);
Note: I have deliberately changed the single quotes around the words from a ' to a ` to highlight the single quote in I'm.
This row was manually inserted into the database and is fine in all the Interbase tools and Delphi.
The problem comes when I try and read this back using the following code:
$stmt = "SELECT trackname, artist FROM track";
$sth = ibase_query($stmt);
$row = ibase_fetch_row($sth);
print "Artist=".$row[1]." - title=".$row[0];
ibase_free_result($sth);
I see the following result.
Artist=Garbage - title=I Think I''m Paranoid
Note the double single quote.
Where am I going wrong?
Bryan