Home/ Forum / When using Server: Uncaught TypeError: mysqli_fetch_all(): Argument #1 ($result) must be of type mysqli_result, bool given
When using Server: Uncaught TypeError: mysqli_fetch_all(): Argument #1 ($result) must be of type mysqli_result, bool given
I'm using the following code:
$userdata = mysqli_query($db, "SELECT RANK() OVER(ORDER BY ranking DESC) AS rank_place, user, userid, round, ranpoints, ranking FROM tournament WHERE tourid='$tourid' AND tourtype='$tourtype' LIMIT 10");
$rows = mysqli_fetch_all($userdata, MYSQLI_ASSOC);
echo json_encode($rows);
When running locally (xampp), everything is fine. Running on webserver, this error appears: Uncaught TypeError: mysqli_fetch_all(): Argument #1 ($result) must be of type mysqli_result, bool given Testing code without "RANK() OVER(ORDER BY ranking DESC)" with no error (of course with wrong result). But what is wrong or does not fit? Thank you for help.
Reponses
Brinvil smith
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Beatae incidunt debitis veritatis, in quo esse.
$userdata = mysqli_query($db, "SELECT RANK() OVER(ORDER BY ranking DESC) AS rank_place, user, userid, round, ranpoints, ranking FROM tournament WHERE tourid='$tourid' AND tourtype='$tourtype' LIMIT 10");
$rows = mysqli_fetch_all($userdata, MYSQLI_ASSOC);
echo json_encode($rows);
Le 2023-11-23 21:37:48
volcy samuel
Try to go in the wamp's menu and click on the button named Restart Dns
Le 2023-11-24 14:31:13
volcy samuel
if this method don't work try to get the documentation
Le 2023-11-24 15:01:11
volcy samuel
try to use stripe
Le 2023-11-27 20:21:39