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

Ask Question


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


Give an answer


S'INSCRIRE DANS NOTRE NEWSLETTER

Membres

Projects

Port-au-Prince , Haiti

+50931947963
  • BLOG

  • 2024-12-17 12:13:56
    La Corée du Sud franchit un pas de géant dépassant les États-Unis dans la course à l’IA générative défensive Lire plus
    2024-10-18 22:17:20
    Des chercheurs développent un WiFi ultra-rapide capable d'atteindre 1 terabit par seconde ! Lire plus
      CONTACT

    Copyright 2024 © JuksGraphic. All right reserved. Powered by JuksGraphic.