The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DB Update - Not working (that's the way it seems)
#2
After $db->update you can do something like this:
if(!$db->error()) {
#no error happened
} else {
#an error happened, you can find out what by dumping error or errorString(), eg:
dump($db->errorString());
#I prefer to log my errors, if this is a logged in page:
logger($user->data()->id,"Log Type","Error updating RTU Name, Error: ".$db->errorString());
}

I wrote this without an editor so there could be errors. Furthermore you can verify, if no errors, the count of rows updated with $db->count();

Hopefully this helps.
  Reply


Messages In This Thread
RE: DB Update - Not working (that's the way it seems) - by Brandin - 02-14-2019, 02:04 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)