mysql_fetch_array error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mlummus
Forum Newbie
Posts: 5
Joined: Tue Apr 20, 2010 8:22 pm

mysql_fetch_array error

Post 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
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: mysql_fetch_array error

Post by requinix »

You're mixing mysql and mysqli. They're quite different.

Pick one and go with it.
Post Reply