All pastes #494558 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-05-18 09:48 UTC
rendered paste body
$checkid="select MAX(sno) from registrants";
$id=mysql_query($checkid) or die("Unable to execute query"); // Max sno is now stored in $ID
echo $id;    


OUTPUT : 

Resource id #4


Output should be '1' as I have only one row in the table with sno=1