note 19056 deleted from function.mysql-num-rows by betz

From: Date: Sat, 10 Aug 2002 17:13:40 +0000
Subject: note 19056 deleted from function.mysql-num-rows by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-34766@lists.php.net to get a copy of this message
What if you wanted to count how many entries where added by the id? category: id subid url urlname and you had this enterred: 1 2 yahoo.com yahoo 2 2 google.com google 3 1 myserver.com server example: $query = "SELECT * FROM table where subid=2"; $result = mysql_query($query); $rows = mysql_num_rows($result); echo "Subid Entries: $rows<br>"; you would get this result: Rows: 2 Just say you wanted that to affect multiple subids. so you could get the result of: Subid Entries: 2 Subid Entries: 1 I always gets the last result only, and wanted to count all the related subids to get a count of how many went where.

« previous php.notes (#34766) next »