I have came across an error on my website, I wondered if anyone could help? I have the word Banks O'Dee in my php database ($buyfrom) and I receive this error when accessing my page..
select location from opposition_team where opposition='Banks O'Dee'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 'Dee'' at line 1
And this is the code I use on my php page for this part
$q4="select location from opposition_team where opposition='$buyfrom'"; $qr4=mysql_query($q4,$ccppdbc)or die($q4.mysql_error()); $r4=mysql_fetch_object($qr4); $location=$r4->location; [/CODE]
Can I not make this work without changing the word Banks O'Dee so it doesn't have the [b]' [/b]as I believe that is whats causing it.
Question
marklcfc
I have came across an error on my website, I wondered if anyone could help? I have the word Banks O'Dee in my php database ($buyfrom) and I receive this error when accessing my page..
And this is the code I use on my php page for this part
Can I not make this work without changing the word Banks O'Dee so it doesn't have the [b]' [/b]as I believe that is whats causing it.
Link to comment
Share on other sites
6 answers to this question
Recommended Posts