SELECT MIN(order), MAX(order) SYNTAX ERROR

2003-05-31 Thread mike wOZniewski
Hi... silly question maybe. I want to execute the following query: mysql_query(SELECT MIN(order), MAX(order) FROM downloads WHERE class='1'); ...but it doesn't work and gives me a SYNTAX ERROR. If I use my 'id' column (the primary key) instead of the 'order' column, it works fine:

Re: SELECT MIN(order), MAX(order) SYNTAX ERROR

2003-05-31 Thread gerald_clark
mike wOZniewski wrote: Hi... silly question maybe. I want to execute the following query: mysql_query(SELECT MIN(order), MAX(order) FROM downloads WHERE class='1'); order is a reserved word. try: MIN(`order`), MAX(`order`) Note use back ticks ` NOT ' ...but it doesn't work and gives me a