Url to iinput into Mysql using PHP
Posted: Sun Jun 25, 2006 7:14 am
hi There,
im trying to add a URL to a mysql database using a PHP code.
This is probably going to sound stupid to the PHP whizz's out there but im stuck on it and cant find the right words to search for the answer.
When i try to add the url its tell me i have errors in my mysql syntax, most likey its to do with the ?, backslashes and other special characters contained within the URL.
Im pretty sure theres a command to tell php and mysql to ignore these as special characters and treat them as normal text but i cant think what it is!!
Can anyone help me?
The url is:
http://www.ladbrokes.com/lbr_portal?act ... TXT=PORTAL
The error i get is:
Error updating database: 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 ') VALUES (,'Labrokes')' at line 1<br><br>
INSERT INTO bookies (url,title,) VALUES (,'Labrokes')
It shows up as if i dont have any URL to import but when i stepped through my code i have a URL in the variable i pass to this query.
Kind regards
Nash
im trying to add a URL to a mysql database using a PHP code.
This is probably going to sound stupid to the PHP whizz's out there but im stuck on it and cant find the right words to search for the answer.
When i try to add the url its tell me i have errors in my mysql syntax, most likey its to do with the ?, backslashes and other special characters contained within the URL.
Im pretty sure theres a command to tell php and mysql to ignore these as special characters and treat them as normal text but i cant think what it is!!
Can anyone help me?
The url is:
http://www.ladbrokes.com/lbr_portal?act ... TXT=PORTAL
The error i get is:
Error updating database: 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 ') VALUES (,'Labrokes')' at line 1<br><br>
INSERT INTO bookies (url,title,) VALUES (,'Labrokes')
It shows up as if i dont have any URL to import but when i stepped through my code i have a URL in the variable i pass to this query.
Kind regards
Nash