displayin the last updated record
Posted: Thu Mar 03, 2005 5:55 pm
sirs, i hope you wont get annoyed with some of my questions....
how can i display the last updated record in my table...
or maybe the last maximux record with that user...
heres my code:
$query = "select * from tbl where userName = '$user' and timeid >= (LAST_INSERT_ID())";
$result = mysql_query($query);
while($nt=mysql_fetch_array($result)){
echo "<html><body><span class='style7'>data1 :</span> $nt[userName] <span class='style7'>data2: </span>$nt[data2] <span class='style7'>data3: </span>$nt[data3]<span class='style7'> data4 : </span>$nt[data4]<br>\n</body></html>";
}
the output of this code is that it displays all the record entry of that user...
how can i make it to display the last entry.... maybe some revising of the code will do....
thanks so much!
-- sernan
how can i display the last updated record in my table...
or maybe the last maximux record with that user...
heres my code:
$query = "select * from tbl where userName = '$user' and timeid >= (LAST_INSERT_ID())";
$result = mysql_query($query);
while($nt=mysql_fetch_array($result)){
echo "<html><body><span class='style7'>data1 :</span> $nt[userName] <span class='style7'>data2: </span>$nt[data2] <span class='style7'>data3: </span>$nt[data3]<span class='style7'> data4 : </span>$nt[data4]<br>\n</body></html>";
}
the output of this code is that it displays all the record entry of that user...
how can i make it to display the last entry.... maybe some revising of the code will do....
thanks so much!
-- sernan