Thread: Sql Query
View Single Post
Old 06-10-2008, 08:00 PM   #2 (permalink)
web_doctor
Super Moderator
 
Join Date: Jun 2008
Location: PH
Posts: 95
Rep Power: 11 web_doctor is on a distinguished road
Default

I saw your posts and your image, please try to write in your sql
SQL: "SELECT LS.* FROM tblListings LS, tblListingFloorPlans LFP WHERE LS.IngLIstingId=LFP.IngListingId AND LFP.txtBed='2' GROUP BYLFP.txtTitle"

If you want to sort your result in order basing on the LFP.txtTitle , just add ASC - for ASCending or DESC - for DESCending at the end of the query before the last diuble qoute, like this one.

SQL: "SELECT LS.* FROM tblListings LS, tblListingFloorPlans LFP WHERE LS.IngLIstingId=LFP.IngListingId AND LFP.txtBed='2' GROUP BY LFP.txtTitle ASC" ---> this will sort the result based on LFP.txtTitle in ASCending order

and another example is

SQL: "SELECT LS.* FROM tblListings LS, tblListingFloorPlans LFP WHERE LS.IngLIstingId=LFP.IngListingId AND LFP.txtBed='2' GROUP BY LFP.txtTitle DESC" ---> this will sort the result based on LFP.txtTitle in DESCending order

I hope this helps. Let me know. Thanks

Last edited by web_doctor; 06-10-2008 at 08:04 PM.
web_doctor is offline   Reply With Quote