try select * from table where field2=0 order by field3 desc limit 30 I think you need the column to compare.
> If I have a query like: > > select field1 from table where field2=0 order by field3 desc limit 30; > > and I have keys: > > key field2 (field2) > key field3 (field3) > > Will MySQL use one key to select and one to order? Or do I need a: > > key field2_field3 (field2, field3) > > This is a big table and i don't want to have to alter it unless I need too. > > thanks, > > Brian. > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php