Re: Very complex query
| From: | Justin Patrin | Date: | Thu, 11 Dec 2003 07:52:53 +0000 |
| Subject: | Re: Very complex query | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-31978@lists.php.net to get a copy of this message | ||
Mike U. Petrov wrote:
Hi every1! Excuse me for maybe offtopic but I need help on mysql database. I have 4 tables, and here are some important extractions from 'em: objects{ object_id; name; } users{ user_id; nick; date; } notes{ user_id; object_id; } object_properties{ object_id; property_name; property_value; } I need to get EACH object_id from notes with ONLY ONE of corresponding user_id's. Also for each object I need it's name from objects and property from object_properties where property_name = 'foo'. And for each of obtained user_id I need it's nick and it's date. Does anyone know how to do it just by one mysql query? Thanx... Mike U. PetrovUse unique(user_id). And please don't reply to a previous post when posting a new thread....it screws up threading. -- paperCrane <Justin Patrin>