Why did pdo execute return true, to indicate that there was an error in this line?

$op = Db::pdo()->prepare($sql);
$result = $op->execute($execute);      
var_dump($result);
if ($result) {
    return $op->$resultMode();
}

error message:
Fatal error: Uncaught Error: Call to a member function execute () on boolean in xxxxxxxxxx
Error: Call to a member function execute () on boolean in xxxxxxxxx

then I use $op- > errorCode () to get 00000, indicating that the also successful
errorinfo can"t get the mysql error message. What"s going on?

add:
the sql statement goes like this: normally, name = "qq", but I changed" qq" to *
. The problem is that errorinfo can"t get the error message of mysql either

.
Php
Jul.12,2021

if you call the execute method on the boolean type, there is only one case. Prepare returned false causing $op to be false. Take a look at your $sql

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b83c-2c291.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b83c-2c291.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?