ecabrera Posted March 16, 2015 Share Posted March 16, 2015 I don't understand why this isn't showing up. I get this mysqli_fetch_assoc() expects parameter 1 to be mysqli_result but don't understand include "db.php"; $get = "SELECT * FROM `users`"; $getquery = mysqli_query($db,$get); $rows = mysqli_fetch_assoc($getquery); $id = $rows['id']; $dbemail = $rows['email']; $last = $rows['last']; echo $dbemail; Link to comment https://forums.phpfreaks.com/topic/295287-data-doesnt-show-up/ Share on other sites More sharing options...
Barand Posted March 16, 2015 Share Posted March 16, 2015 See what the error message is with echo $db->error; Link to comment https://forums.phpfreaks.com/topic/295287-data-doesnt-show-up/#findComment-1508214 Share on other sites More sharing options...
ecabrera Posted March 16, 2015 Author Share Posted March 16, 2015 The database is fine nothing is wrong with. I did echo $db->error; and nothing appears the only thing that appears is in my error log mysqli_fetch_assoc() expects parameter 1 to be mysqli_result Link to comment https://forums.phpfreaks.com/topic/295287-data-doesnt-show-up/#findComment-1508215 Share on other sites More sharing options...
Barand Posted March 16, 2015 Share Posted March 16, 2015 $getquery will either be a mysqli result or, if the query failed, it will be "false". As you get a message saying it is not a result then the query failed and there should be an error message $get = "SELECT * FROM `users`"; $getquery = mysqli_query($db,$get); if (!$getquery) echo $db->error; Link to comment https://forums.phpfreaks.com/topic/295287-data-doesnt-show-up/#findComment-1508217 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.