Flourish PHP Unframework
This is an archived copy of the forum for reference purposes

How to get insert_id from query?

posted by unknow 7 years ago

Hi all,

I've this code:

$returnData = $this->sqlObj->query("INSERT INTO `TABLE` (`COLUMN`) VALUES ('DATA');");

How can I get last insert id from this object, $returnData ?

Thanks for answer.

Have a look at these discussion threads http://flourishlib.com/discussion/1/408

The ->getId() method is an example assuming your column is named id.

posted by carlton 7 years ago