Code: Select all
tags when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
I do not understand why I keep getting this warning. The script works fine if I DO NOT include "?id=abcd", but as soon as I add an id I get this error.
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/xxxxxx/xxxxxxxx/success-1.php on line 36
.
I have tried both fetch_array or fetch_row here?Code: Select all
if(!$id) {
$result = mysql_query("Select username FROM dreamteam_db WHERE num_joined < 2 limit 1",$link);[b] [u]//This works fine[/u][/b]
}else{
$result = mysql_query("SELECT * FROM dreamteam_db WHERE username = $id",$link);
}
$myrow = mysql_fetch_array($result); [b][u]//(This is line 36)[/u][/b]
$username = $myrow["username"];
$id = $myrow["LKey"];
$fname = $myrow["fname"];feyd | Please use
Code: Select all
tags when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]