0

I have a query that used union all..
and produces a table like this:

`+-------------+------------------------+-----------+--------------+
| Type        | Name                   | IDNum     | Warnings     |
+-------------+------------------------+-----------+--------------+
| M           | sample                 | 2013-1    |            4 | 
| L           | sample                 | 2013-1    |            2 | 
+-------------+------------------------+-----------+--------------+`

now i made a while loop to get the data under the warning column:

while ($warning = mysql_fetch_objects($queryResult)){
switch($warning->Type){
case 'M': $M = $warning->Warnings;break;
case 'L': $L = $warning->Warnings;break;
}
}

but now then it only gives me the result of case M, its not looping back to check the other type to the switch case..

I need clarification and help....

2
Contributors
1
Reply
18
Views
4 Years
Discussion Span
Last Post by pritaeas
0

Shouldn't that be mysql_fetch_object (without the 's')? Can you show some more code if that is not the problem?

Edited by pritaeas

This topic has been dead for over six months. 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.