mysql row num code example
Example 1: mysql num rows
//number of rows retrieved from a query
<?php
$link = mysql_connect("localhost", "mysql_user", "mysql_password");
mysql_select_db("database", $link);
$result = mysql_query("SELECT * FROM table1", $link);
$num_rows = mysql_num_rows($result);
echo "$num_rows Rows\n";
?>
Example 2: row number mysql
SELECT row_number() over ( order by firstName) RowNumberSqeuence,FirstName from rowNumberDemo
order by FirstName;