Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

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
";

?>

Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #mysql #num #rows
ADD COMMENT
Topic
Name
3+5 =