garry Posted June 1, 2008 Share Posted June 1, 2008 So what I want to have is a table with the latest reviews from my database and I want to have two results per row on the table. Here's the query I'm using: SELECT reviews.id AS reviewid, reviews.artist_id, reviews.album_id, artists.id AS artistid, artists.artist, albums.id AS albumid, albums.title, albums.thumb FROM artists, reviews, albums WHERE reviews.artist_id = artists.id AND reviews.album_id = albums.id ORDER BY reviews.created_at DESC LIMIT 5 And then I use a while loop to have a new <tr> for each result. How can I change this so I can have the first two results in a <tr> and the next two in another.. and so on.. Thanks! Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted June 1, 2008 Share Posted June 1, 2008 See this FAQ/code snippet. Its just what you're after. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.