Jump to content

Issues with mysqli_fetch_array


Recommended Posts

I'm running this PHP script:

	global $connection;	$query = "SELECT titel, description, pris1, pris1_dur, pris2, pris2_dur, pris3, pris3_dur, pris4, pris4_dur, image, sub_subject_id		FROM user		WHERE user_id = '" . $_SESSION['user_id'] . "'";	$data = mysqli_query($connection, $query);	$row = mysqli_fetch_array($data);

And I'm getting this error returned:

Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in /volume1/web/...php on line 101

Line 101 is the mysqli_fetch_array line. Can anyone spot the error? I've tested the query in phpMyAdmin and it works fine. Thanks in advance :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...