Jump to content

[SOLVED] Check how many articles and display...


Aureole

Recommended Posts

<?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 "We have a total of $num_rows ews articles.\n";

?> 

 

 

http://www.php.net/mysql_num_rows

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.