No need for another connect as long as selecting from same server as the same user. Perhaps there are no bids for some of the lot_id's? Perhaps you do not care that there are bids returned and want to shut mysql_num_rows up by prepending the @ sign in front of it. Like @mysql_num_rows($bid_result)
James On Tuesday 01 July 2003 05:53 pm, Sparky Kopetzky wrote: > Hi! > > I've got two nested queries where one looks up data based on values > returned from the first. > > $lot_query = "SELECT * FROM LOT WHERE lot_category_id=" . $lot_category > . " AND lot_close_time>" . time(); > $lot_result = mysql_query($lot_query, $CONNECT_ID); > > if ($lot_result) > { > while ($row = mysql_fetch_array($lot_result)) > { > blah-blah-blah... > > $bid_query = "select * from bids where bid_lot_id=" . $lot_id . > " order by bid_amount"; > $bid_result = mysql_query($bid_query, $CONNECT_ID); > $bid_count = mysql_num_rows($bid_result); > > blah-blah-blah... > > I get this error message: "Warning: mysql_num_rows(): supplied argument is > not a valid MySQL result resource " from the second query. Do I need a > second $CONNECT_ID for a second link to mysql_query #2?? > > Robin E. Kopetzky > Black Mesa Computers/Internet Services > www.blackmesa-isp.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php