Weird Stuff with fetch array

admin

Administrator
Staff member
I'm usually good at debugging my scripts. I've also used the code below many times with no problems. However, I'm now working with php4 and receiving the following errors.

Code:

$sql = "select * from sponsors_login where username = '$spuser' and password = '$sppass'";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{

When I run the script I get:

Warning: Supplied argument is not a valid MySQL result resource in /libs/modules/file.php on line 19...which is >> while($row = mysql_fetch_array($result)).

Is it the mysql fetch array call or what? The code looks fine, right? Any suggestions?

Thanks! :)
 
Back
Top