Error in Hooks - Fatal error: Uncaught TypeError: mysqli_fetch_row
Posted: 2022-08-09 21:00
function receipts_after_update($data, $memberInfo, &$args) {
if ($username != 'admin'){sqlValue("UPDATE membership_userrecords SET memberID='admin' WHERE pkValue='{$data['job_id']}'");}
Code does what I want and sets the owner of the records to admin but throws this error.
Fatal error: Uncaught TypeError: mysqli_fetch_row(): Argument #1 ($result) must be of type mysqli_result, bool given in C:\xampp\htdocs\ifcc\db.php:59 Stack trace: #0 C:\xampp\htdocs\ifcc\db.php(59): mysqli_fetch_row(true) #1 C:\xampp\htdocs\ifcc\admin\incFunctions.php(489): db_fetch_row(true) #2 C:\xampp\htdocs\ifcc\hooks\receipts.php(91): sqlValue('UPDATE membersh...') #3 C:\xampp\htdocs\ifcc\receipts_dml.php(284): receipts_after_update(Array, Array, Array) #4 C:\xampp\htdocs\ifcc\datalist.php(318): receipts_update('7', '') #5 C:\xampp\htdocs\ifcc\receipts_view.php(140): DataList->Render() #6 {main} thrown in C:\xampp\htdocs\ifcc\db.php on line 59
if ($username != 'admin'){sqlValue("UPDATE membership_userrecords SET memberID='admin' WHERE pkValue='{$data['job_id']}'");}
Code does what I want and sets the owner of the records to admin but throws this error.
Fatal error: Uncaught TypeError: mysqli_fetch_row(): Argument #1 ($result) must be of type mysqli_result, bool given in C:\xampp\htdocs\ifcc\db.php:59 Stack trace: #0 C:\xampp\htdocs\ifcc\db.php(59): mysqli_fetch_row(true) #1 C:\xampp\htdocs\ifcc\admin\incFunctions.php(489): db_fetch_row(true) #2 C:\xampp\htdocs\ifcc\hooks\receipts.php(91): sqlValue('UPDATE membersh...') #3 C:\xampp\htdocs\ifcc\receipts_dml.php(284): receipts_after_update(Array, Array, Array) #4 C:\xampp\htdocs\ifcc\datalist.php(318): receipts_update('7', '') #5 C:\xampp\htdocs\ifcc\receipts_view.php(140): DataList->Render() #6 {main} thrown in C:\xampp\htdocs\ifcc\db.php on line 59