Re: Simple Problem
| From: | John Nichel | Date: | Tue, 12 Apr 2005 15:32:22 +0000 |
| Subject: | Re: Simple Problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-212927@lists.php.net to get a copy of this message | ||
PartyPosters wrote:
I can't figure out what I am doing wrong, this sql string seems to filter out the information I want but it duplicates the all info, as 'num_rows' is total of rows in the table and not the correct value of the filtered information? $sql="SELECT products.productID, products.title, products.number_per_box, products.stock_level, products.image, users.username, users.email, users.userID FROM users, products WHERE products.userID = $userID"; $mysql_result=mysql_query($sql,$connection); $num_rows=mysql_num_rows($mysql_result); this is the old sql statement which works fine - $sql="SELECT productID, title, number_per_box, stock_level, image, userID FROM products WHERE userID = '$userID'"; $mysql_result=mysql_query($sql,$connection); $num_rows=mysql_num_rows($mysql_result);http://lists.mysql.com -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 john@kegworks.com