Page 1 of 1

Help... Error having to do with "quotes" I think..

Posted: Wed Dec 14, 2005 10:16 pm
by John Rowe
Hi,

I'm getting this error...
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/font>A minimally invasive procedure using sound waves to destroy the tissue of' at line 4]

and this is the line in the script tha it is refering to...

Code: Select all

$line = "<font color='$line2_color'>".$line."</font>";
I'm also getting a similar error for this line...

Code: Select all

$line = "<a href='$link' target='_blank'>Full $someotherwords article...</a>";
Here is the error for that one...
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'http://www.medicalnewstoday.com/medical ... wsid=34938' target='_blank'>Fu' at line 3]

I feel pretty sure it has to do with the "quotation marks"... but I have no idea what changes to make.

Any help is highly appreciated.

Kindly,
John

Posted: Wed Dec 14, 2005 10:49 pm
by neophyte
I don't know what WordPress is but ... You need to escape quotes that go into the db. In PHP you would addslashes(). Other wise you need \' like that. Hope that helps