You are here: Re: I have a tricky MySQL Query « All PHP « IT news, forums, messages
Re: I have a tricky MySQL Query

Posted by Sullivan Dane on 04/13/06 03:09

Hi .... when u do a SELECT statement, by default, the result set is
ordered by the index key/ keys defined in the table.... in example:
imagine a orders table having an UniqueID field as the primary key and
a DateofOrder field(timestamp) defined as a index of that table... any
SELECT statement (regardless of the WHERE clause) would by ordered
firstly by UniqueID field then by the DateofOrder field.... unless of
course that u use the ORDER BY clause ..

anyway IMHO if u are trying to extract an specific subset of data to
show to the the enduser a good way is to use a combination of the
BETWEEN and the LIMIT clause 'cause it extracts a specific subset of
data while limiting the records u want to return to the user...


i hope it helps in some way

Sullivan

"The major difference between a thing that might go wrong and a thing
that cannot possibly go wrong is that when a thing that cannot possibly
go wrong goes wrong it usually turns out to be impossible to get at or
repair."

Douglas Adams (1952 - 2001)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация