MySQL Forums
Forum List  »  PHP

Re: Returing multiple rows based on 2 criteria
Posted by: Barry Galbraith
Date: December 09, 2012 10:56PM

You get them here
// Retrieve Order Items
$sql = mysql_query("SELECT * FROM `order_line` WHERE `orderID` = ".$row['orderID']);
$orderItems = mysql_fetch_array($sql);
but don't retrieve orderItems into anything.

Also, you should NOT use SELECT * but SELECT column1, column2.... It's more efficient, and you know what field names you're going to get.

Good luck,
Barry.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.