New York Design & Development Forums  

Go Back   New York Design & Development Forums > Development > Website Programming
Connect with Facebook

Notices

Reply
 
LinkBack Thread Tools
Old 12-05-2006, 02:55 PM   #1 (permalink)
Junior Member
Newb
 
penguinmama's Avatar
 
Join Date: Nov 2006
Posts: 9
penguinmama is on a distinguished road
Default Can someone help with this?

Ok, here's the deal. I'm working on a real estate site. Each listing can have several pictures... or, rarely, NO picture.

My current code:

PHP Code:
$result=mysql_query("SELECT listings.listing_id, listings.type, listings.tag, listings.beds, listings.baths, FORMAT(listings.price,0), listings.sqft, images.filename FROM listings LEFT JOIN images ON listings.listing_id=images.listing_id  WHERE type=$type ORDER BY $sort"); 
lists *all* the images, making several entries per listing. How do I make it only show *one* per listing_id, but show *all* listings, still?
penguinmama is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Google Bookmark this Post!Blink this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 04:02 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13