Re: The most elegant/efficient way to pull this SQL query

2012-04-12 Thread Hal�sz S�ndor
2012/04/11 17:51 -0500, Peter Brawley select b.peopleID, concat('(',p.fname,,')'), b.stateID, concat('(',s.state,')') from bridge b join people p on b.peopleID=p.peopleID join state s on b.stateID=s.stateID; Since the names are the same in the tables, it works to use USING, too, and you are

Re: The most elegant/efficient way to pull this SQL query

2012-04-12 Thread Haluk Karamete
My initial goal was to write a very convenient php function that display a table view based on arguments that are super simple to write - without requiring the developer to type-in ( or know ) the ins and outs of joins, natural joins etc. Something like this function

Re: The most elegant/efficient way to pull this SQL query

2012-04-12 Thread Hal�sz S�ndor
; 2012/04/12 11:56 -0700, Haluk Karamete My initial goal was to write a very convenient php function that display a table view based on arguments that are super simple to write - without requiring the developer to type-in ( or know ) the ins and outs of joins, natural joins etc. Something

Re: The most elegant/efficient way to pull this SQL query

2012-04-11 Thread Peter Brawley
On 4/11/2012 1:30 PM, Haluk Karamete wrote: I've got this relational mySQL table that ties peopleIDs from the people table to the states IDs peopleID___stateID 1__1 2__4 3__5 people table is like this;

Re: The most elegant/efficient way to pull this SQL query

2012-04-11 Thread Hal�sz S�ndor
; 2012/04/11 11:30 -0700, Haluk Karamete I've got this relational mySQL table that ties peopleIDs from the people table to the states IDs peopleID___stateID 1__1 2__4 3__5 people table is like this; ___peopleID_FName_