Posted by Marcin Dobrucki on 11/17/06 08:56
casper christensen wrote:
> Well, I guess you Gurus are right:) but I don't realy know how to do
> what you just wrote.
>
> Can anyone give an example on how the code should look?
....
$db = new mysqli(/* db connect params */);
$res = mysqli->query("insert into foo values /* whatever */");
// check for error
$res = mysqli->query("select last_insert_id()");
then parse the resulting object out as any mysqli result.
/Marcin
Navigation:
[Reply to this message]
|