boolean query problem
Posted: Tue Jun 08, 2010 9:50 am
hello,
if i run my query i get this error
am i correct in thinking this is because it thinks there are no results?
this is the query code where last line is line 41
the values returned from the database are boolean values.
when i run this query
i get one row as expected.
if i run my query i get this error
Code: Select all
Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in ...... line 41this is the query code where last line is line 41
Code: Select all
$query2 = "SELECT remove_client, add_new, modify_client, view_client".
"FROM roles".
"WHERE rid=".
"(SELECT rid".
"FROM login".
"WHERE uid= ".$_SESSION['user_id'].")";
$results = mysqli_query($dbc, $query2);
$row_vals = mysqli_fetch_row($results);when i run this query
Code: Select all
SELECT remove_client, add_new, modify_client, view_client
FROM roles
WHERE rid = (
SELECT rid
FROM login
WHERE uid =1 )