WarMad Posted February 8, 2023 Posted February 8, 2023 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 Quote
gamble Posted February 8, 2023 Posted February 8, 2023 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 Quote
WarMad Posted February 8, 2023 Author Posted February 8, 2023 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 🤷🏼♂️ Quote
gamble Posted February 8, 2023 Posted February 8, 2023 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 Quote
Joseph Miller Posted November 18 Posted November 18 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. Quote
peterisgb Posted November 18 Posted November 18 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.