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.

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.