I want to show information on my page regarding multiple queries, each of them representing project status. To do that, i made a while loop, that adds information to an array.
The problem with that, is that i only show one of the statuses available, only the first one. Here is my code:
$exec = mysql_query($queryOntime) or trigger_error(mysql_error());
$exec1 = mysql_query($queryDelayed) or trigger_error(mysql_error());
$exec2 = mysql_query($queryPending) or trigger_error(mysql_error());
$array_dados = array();
// All chart data
while($info = mysql_fetch_array($exec)||$info1 = mysql_fetch_array($exec1)||$info2 = mysql_fetch_array($exec2)){
$array_dados[] = $info;
$array_dados[] = $info1;
$array_dados[] = $info2;
}
return $array_dados;
So as you can see, i have 3 queries, and i try adding all of them into an array, yet only one of the $info shows up. Why is that?
EDIT:
I removed the OR and separated my Fetch arrays, yet it still only shows the "Pending" one. Here's how it looks right now:
$exec = mysql_query($queryPending) or trigger_error(mysql_error());
$exec1 = mysql_query($queryOntime) or trigger_error(mysql_error());
$exec2 = mysql_query($queryDelayed) or trigger_error(mysql_error());
$array_dados = array();
//All chart data
while($info = mysql_fetch_array($exec))
$array_dados[] = $info;
while($info1 = mysql_fetch_array($exec1))
$array_dados[] = $info1;
while($info2 = mysql_fetch_array($exec2))
$array_dados[] = $info2;
return $array_dados;