You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to redbe...@googlegroups.com
Hi, for the odd reason I had to use R::exec function to insert new data.
The problem is, how do I get insert id after doing R::exec?
Thanks.
gabor
unread,
Mar 7, 2015, 5:48:34 AM3/7/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to redbe...@googlegroups.com
R::$adapter->getInsertID()
or in 4.2 beta 3:
R::getInsertID()
cheers Gabor
Will Blackamoor
unread,
Jan 20, 2016, 3:19:27 PM1/20/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to redbeanphp
Hi Gabor, rather than open a new thread i thought i would rather ask here. Is there a method for getting the affected rows from an Atomic/Conditional Update Query. Since its conditional i had to Use exec, but i haven't been able to find any information about it so far on google.
gabor
unread,
Jan 20, 2016, 3:27:19 PM1/20/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to redbeanphp
Hi,
R::exec will return the number of affected rows.
R::setup(); R::store(R::dispense('bean')->setAttr('xname','beanie')); $x = R::exec('UPDATE bean SET xname = 1234 WHERE id < 2'); var_dump($x);