asked on
SELECT TABLE_ROWS
FROM TABLES
WHERE TABLE_NAME = `my_table` and TABLE_SCHEMA=`my_database`
;
$Sql = "SELECT .. FROM ... WHERE ...";
$Result = mysql_query($Sql) or ....;
$NumRows = mysql_num_rows($Result);
echo "I found ".$NumRows." records.";
if ($NumRows == 0) {
echo "no results";
}
else {
while ($row = mysql_fetch_assoc($Result)) {
// do what u need...
}
}
PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.
TRUSTED BY
Eg.
Open in new window