Jump to content
MakeWebGames

Recommended Posts

Posted

I am starting a new game and I’m updating a the code to php 8 and all my queries are running and not throwing an error but they are all returning 0 I am using mtg’s pdo wrapper 4D965B3C-F9F1-4CF3-AA57-9EBC5AC602F2.thumb.jpeg.5635bdcaba2e612f8bb79e0bf5b60206.jpeg

Posted

Unfortunately there's no information here that can really help us help you.

 

Try going into your file manager then the logs folder (should be on the same level as the public_html).  In there I'd assume there's a PHP error log file. It'll have a ton of information as to what's going on

Posted

No errors at all there is nothing sent to the logs and as you see nothing displayed on the web page I’m aware I’m not giving much but I’m not getting anything to give 🤷🏼‍♂️

Posted

Interesting...try adding

 

error_reporting(-1);

 

To the top of your main php file. Whether it's header.php config.php or whatever. Just the main file. It should turn on ALL error reporting then maybe something will show up in the log...I think by default it's off

 

  • 3 years later...
Posted

Worth clarifying what “returning 0” means: rowCount() on a SELECT is driver-dependent and can be 0 even when rows exist, so use fetchAll()/fetch() to count. If fetches are empty, error_reporting may not expose PDO failures because the wrapper can swallow them—temporarily instantiate raw PDO with ERRMODE_EXCEPTION and run one of the same queries, then check errorInfo(). That will separate a PHP 8/PDO issue from the wrapper’s behavior.

Posted
3 hours ago, Joseph Miller said:

Worth clarifying what “returning 0” means: rowCount() on a SELECT is driver-dependent and can be 0 even when rows exist, so use fetchAll()/fetch() to count. If fetches are empty, error_reporting may not expose PDO failures because the wrapper can swallow them—temporarily instantiate raw PDO with ERRMODE_EXCEPTION and run one of the same queries, then check errorInfo(). That will separate a PHP 8/PDO issue from the wrapper’s behavior.

Your going through old dead posts and bumping them, I'd class you as a spammer.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...