<?php
Connect to the database
mysql_connect("localhost","root","password");
mysql_select_db("test");
// Query the database and get the count
$result = mysql_query("SELECT * FROM tablename");
$num_rows = mysql_num_rows($result);
// Display the results
echo $num_rows;?>
Connect to the database
mysql_connect("localhost","root","password");
mysql_select_db("test");
// Query the database and get the count
$result = mysql_query("SELECT * FROM tablename");
$num_rows = mysql_num_rows($result);
// Display the results
echo $num_rows;?>
0 comments:
Post a Comment