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
displayin the last updated record
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
SELECT * FROM `tbl` WHERE `userName` = '$user' ORDER BY `timeid` DESC LIMIT 1displayin the last updated record
feyd,
sir thanks so much! i really appreciated ur help! it worked!
regards,
nhan
sir thanks so much! i really appreciated ur help! it worked!
regards,
nhan