Auto increment get Last id in mysql database for map two tables
<?php
$sql="INSERT INTO emailcampaign(campaignid, campaignnm,campaignsubject,campaignbody,userid,createdate,status)VALUES
('','$cname','$csubject','$cbody','$sid','$dt','0')";
$res=mysql_query($sql);
$aid=mysql_insert_id();// generate automatic first get auotomatic increments id
printf("Last inserted record has id %d\n", mysql_insert_id());//demo
?>
About
quora Questions & Answers A-Z
This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
0 comments:
Post a Comment