This is my code:
$bookresult = mysqli_query($db, "SELECT bookID
FROM order_items
WHERE orderID = '".$orders['orderID']."';");
The problem I have is that there are multiple bookIDs that are pulled out of MySQL. So when I do this:
$books = mysqli_fetch_array($bookresult);
There is no way for me to get all the bookIDs that should show when using that select statement, unless I’m doing something wrong.
You need to use a loop to go through all of the values.
You can view them by using the following php code.
(You can use mysql_fetch_array in place of mysql_fetch_assoc if you wish.
The output there is great for debugging…replace it with what you think is best after you solve this problem. 🙂
Hope this helped.