Брой на резултати

C++ JAVA
Post Reply
User avatar
nickflash
Турист
Турист
Posts: 217
Joined: Fri Mar 09, 2007 10:13 pm
Answers: 9
Contact:

Брой на резултати

Post by nickflash » Wed Sep 17, 2008 7:43 pm

Как да изкарам броя на върнатите резултати от заявката :)

Code: Select all

 $sql = mysql_query("SELECT * FROM comments WHERE novina='$id' ");

User avatar
unknown
Потребител
Потребител
Posts: 705
Joined: Fri Jan 19, 2007 10:41 am
Answers: 53
Location: Хасково

Post by unknown » Wed Sep 17, 2008 7:48 pm

Code: Select all

$num_rows = mysql_num_rows($sql);

User avatar
BattleGrounds
Гуру
Гуру
Posts: 2473
Joined: Wed Sep 19, 2007 5:30 pm
Answers: 37

Post by BattleGrounds » Wed Sep 17, 2008 7:53 pm

unknown wrote:

Code: Select all

$num_rows = mysql_num_rows($sql);

echo $num_rows;

Post Reply