Well this is an odd thing for sure. Am using MySQL to display a series of alerts, and the query I'm using separates by way of what level the alert is. The table has five columns, but the one being used here is the level column (alert level: 1 - normal; 2 - moderate; 3 - high). ID is used to only display the oddity with the query.
The weird thing is when I run this query, it displays normally:
SELECT * FROM `alerttxt` ORDER BY level ASC
It loses an entry on the web page when I switch the order, but shows all the rows in PHPMyAdmin...which is odd itself:
SELECT * FROM `alerttxt` ORDER BY level DESC
But the minute I add in an extra element:
SELECT * FROM `alerttxt` WHERE level = '2' ORDER BY ID ASC
Things go haywire. I ran this same query in PHPMyAdmin, also using ORDER BY ID DESC, and the return was as follows:
Showing rows 0 - -1
I've never seen this before and am not quite sure how to fix it. Anyone else seen this before and be able to fix it? Thanks, all!
Added 8/31/12 - for grumpy
ID level system status restoretime
0 2 MyISU System is functioning normally NULL
1 2 Network System is functioning normally NULL
2 1 Blackboard System is functioning normally NULL
3 3 Email System is functioning normally NULL
4 1 Banner System is functioning normally NULL
and the structure:
Column | Type | Null | Default
-----------------------------------------------------------------
ID int(11) No
level varchar(3) No 1
system varchar(255) No
status varchar(755) No System is functioning normally
restoretime text Yes NULL