• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 224
  • Last Modified:

Calling two sql statements at once

Is there a way to call two sql statements in one calling?  For instance I have this:

while($row = mysql_fetch_array($sql_comment))

Am I able to do something like:

while($row= mysql_fetch_array($sql_comment && $sql_replies))  ??
1 Solution
No. You need to call them separately and loop them separately.

while (...) {
    while (...) {

pingeyegAuthor Commented:
Darn, because I have two bits of code that are not working the way I want them to.  I am trying to display the subject of a group of question/answers and then when a new subject gets inserted a new set of question/answers starts.  Right now the subject does right, but the a/q are staying in the same place.  To see a working copy of what I mean go to http://www.brannonglover.com.  You will see two subjects, but the first reply that says "I did not see what you were looking at. Could you be more specific?" should be under the second subject at the bottom.

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now