Page 1 of 1

mysql_fetch_array error

Posted: Tue Apr 20, 2010 8:24 pm
by mlummus
I am getting the error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
referencing the third line of this snippet of code:

Code: Select all

$SQLstring = "SELECT * FROM student WHERE id = '$id'";
$QueryResult = mysqli_query($db, $SQLstring);
$Row = mysql_fetch_array($QueryResult);
Any idea where I'm going wrong? I'm new to this so any help is much appreciated.

Michael

Re: mysql_fetch_array error

Posted: Tue Apr 20, 2010 10:48 pm
by requinix
You're mixing mysql and mysqli. They're quite different.

Pick one and go with it.