0

Hi all,

I'm helping a friend redo his database queries and have run into something that I need some advice on. Let me first say that I am not a PHP developer, so please bear with me.

I have two queries that I can merge together, but I will need to separate the data later. For example, let's say I have a book collection section of my site. It allows users to rate books and optionally write a review. What I would like to do is get all this data in one query (I already have the query for this) and then 'query' the recordset to split the results, those who reviewed the book and those who only rated it.

Is this possible in PHP? I've done it in other languages, but not being a PHP developer, I have no idea where to start.

Thanks in advance.

2
Contributors
2
Replies
4
Views
7 Years
Discussion Span
Last Post by cmhampton
0

You would probably have to loop through the resultset and assign each row to an array; you can't just split the resultset;
it might be easier/faster to just have to queries with their own resultset

0

You would probably have to loop through the resultset and assign each row to an array; you can't just split the resultset;
it might be easier/faster to just have to queries with their own resultset

I figured that was the case, but wanted to make sure before I gave up.

Thanks.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.