Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

why does my script return an error?

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Re: why does my script return an error?

Postby tallmaris » Sat Dec 07, 2002 4:20 am

Code: Select all
$result = mysql_query("SELECT url FROM links WHERE id = '$i',$db");


The $db connection must be put as a second argument, and not inside the SQL string, so it should be:
Code: Select all
$result = mysql_query("SELECT url FROM links WHERE id = '$i'" , $db);


Anyway I see you use the "/" to escape special characters (wrong), instead of "\" (right). above all in the last echo:

echo "/">";

that should be echo "\">"; to print the second double quote.

Hope it helps.
Leo.
tallmaris
New php-forum User
New php-forum User
 
Posts: 5
Joined: Mon Dec 02, 2002 7:26 am

Return to PHP coding => General

Who is online

Users browsing this forum: Google Feedfetcher and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.