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
transaction with DB Class
#2
Hmm. Not sure what you're talking about, but if you just need to have them share an id or something like that you can

Do your query...

$db->insert('mytable',$fields);
$lastId = $db->lastId();

Then when you insert into the second table, you have your id from the first table in the $lastId variable to use in the second.
  Reply


Messages In This Thread
transaction with DB Class - by marceloatmartins - 07-12-2017, 08:19 PM
transaction with DB Class - by mudmin - 07-12-2017, 10:27 PM
transaction with DB Class - by marceloatmartins - 07-13-2017, 10:59 AM
transaction with DB Class - by firestorm - 07-13-2017, 01:16 PM
transaction with DB Class - by mudmin - 07-13-2017, 01:20 PM
transaction with DB Class - by marceloatmartins - 07-14-2017, 10:50 AM
transaction with DB Class - by marceloatmartins - 07-14-2017, 11:07 AM
transaction with DB Class - by faguss - 07-14-2017, 10:03 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)