Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- Gaining data from the same table: MYSQL


arran - 4:30 pm on Dec 8, 2005 (gmt 0)


As you guessed, you give the same table two different aliases:

select sire.sire_name, damsire.sire_name from sires sire, sires damsire, run_horses where run_horses.sire_id = sire.id and run_horses.damsire_id = damsire.id

arran.

<added>Sorry storevalley, you beat me to it...</added>


Thread source:: http://www.webmasterworld.com/php/11041.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com