CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Last Inserted ID

Print topic Send  topic

Author Message
abdy
Posted: 09/17/2004, 4:58 AM

After executing the following successfully...


$sql = "INSERT INTO `purchase` ( `email` , `date` , `add` , `area` , `name`, `num`, `product` ) VALUES ( '$email', '$tgl', '$add', '$ship', '$name', '$num', '$product'
)";

$id = $db->query($sql);

I'd like to know what was the last inserted ID.

I need help!!
Don Safar
Posted: 09/17/2004, 7:15 AM

If you are using MySQL look here -
http://dev.mysql.com/doc/mysql/en/Getting_unique_ID.html
If not, just use google with Last Inserted databasename.

"abdy" <abdy@forum.codecharge> wrote in message
news:5414ad1691e660@news.codecharge.com...
> After executing the following successfully...
>
>
> $sql = "INSERT INTO `purchase` ( `email` , `date` , `add` , `area` ,
`name`,
> `num`, `product` ) VALUES ( '$email', '$tgl', '$add', '$ship', '$name',
> '$num', '$product'
> )";
>
> $id = $db->query($sql);
>
> I'd like to know what was the last inserted ID.
>
> I need help!!
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.