Hi guys how can i retrieve the last inserted record from datebase. my primary key is not auto_increment its type is bigint because i want to insert SSN no as a primary key.
when i retrive the data using select query it retrieve the first record store in database but i want to display the last inserted record because i want then to print that record.
so any idea plz help me
my queries are
,
when i retrive the data using select query it retrieve the first record store in database but i want to display the last inserted record because i want then to print that record.
so any idea plz help me
my queries are
Code:
$query="INSERT INTO form1 VALUES('$plan','$subsidiaries', '$ssn','$dob','$initial','$App_lName','$FName','$Middle_Initial','$spouse_LName','$spouse_FName','$Spouse_Middle_Initial','$app_num','$Mailing_address','$city','$state','$zip','$cell','$business_phone','$ext','$home_phone','$email', '$today_date')";
mysql_query($query) or die ("Error in query: $query. ".mysql_error());
Code:
$query = "select * FROM form1"; $result = mysql_query($query) or mysql_error($link); $rs=mysql_fetch_array($result)
Comment