WHERE id = id = '"$category."' AND active ='y' AND order is not NULL ORDER
by order,title

> -----Original Message-----
> From: Eve Atley [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 03, 2004 2:24 PM
> To: [EMAIL PROTECTED]
> Subject: Need correct 'order by' syntax where field does not contain
> "NULL"
> 
> 
> Hi. I had a MySQL DB set up and recently added a field 'order' to allow
> for
> exceptions in a web site menu heirarchy. Fields should be ordered by
> 'order'
> field first where it does not contain 'NULL', and then by field 'title'. I
> had this previously:
> 
> select * from navigation WHERE id = '".$category."' AND active='y' ORDER
> BY
> title
> 
> ...and now, when I put in:
> 
> select * from navigation WHERE id = '".$category."' AND active='y' ORDER
> BY
> order, title
> 
> ...my menu shows nothing. How can I write my statement to allow for ORDER
> by
> order where 'order' does not contain 'NULL', and then title?
> 
> Thanks,
> Eve
> 
> 
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to