[ACCEPTED]-warning problem: expects parameter 1 to be mysqli_result-mysqli
Accepted answer
mysqli_query()
returns FALSE
if there was an error in the query. So 2 you should test for it...
/* Select queries return a resultset */
if ($result = mysqli_query($dbc, "SELECT Name FROM City LIMIT 10")) {
printf("Select returned %d rows.\n", $result->num_rows);
/* free result set */
$result->close();
}
See this link for 1 the mysqli_query
reference
http://php.net/manual/en/mysqli.query.php
Waterfall is probably right. Revise your 2 code as follows:
$result = mysqli_query($dbc,$sql1) or die(mysqli_error($dbc));
// and
$result = mysqli_query($dbc,$sql2) or die(mysqli_error($dbc));
PS: Just wondering what 1 exactly is $page
? Did you forget to do a:
global $page;
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.