Last ID in PostgreSQL using adodb


$sql="INSERT INTO pollquestion (question,pollID,dtcreated,dtmodified) values (".
tosql($txtquestion,"Text").", ".
tosql($pollid,"Number").", ".
"Now(),Now())";
$svdb=clone $db;
$svdb->query($sql.' RETURNING questionid');
$svdb->next_record();
$qid=$svdb->f("questionid");

and you can try:
$this->master_conn->PO_Insert_ID('announcement','modid');
=>> 'announcement': table name
=>> 'modid': an increment id

Install Server Networking Programming

Support you how to install server, networking and Programming Easy

0 comments:

You can post comment with english language or indonesia language.
Anda bisa memberikan komentar dalam bahasa inggris atau bahasa indonesia.