Re: Re: Very complex query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Give me exactly the sample table with data and show what you want there.
I will try to help you.

M.Mamedov

----- Original Message ----- 
From: "Mike U. Petrov" <_mike@xxxxx>
To: "Muhammed Mamedov" <muhammed@xxxxxxxxxx>; <php-db@xxxxxxxxxxxxx>
Sent: Thursday, December 11, 2003 10:17 AM
Subject: RE:  Re: Very complex query


> No, DISTINCT isn't match my purpose cause of it rerurns unique rows but I
> need ONE user_id per one object_id.
>
> Mike U. Petrov
>
>
> -----Original Message-----
> From: Muhammed Mamedov [mailto:muhammed@xxxxxxxxxx]
> Sent: Thursday, December 11, 2003 11:01 AM
> To: php-db@xxxxxxxxxxxxx
> Subject: Re:  Re: Very complex query
>
>
> You can also DISTINCT command instead.
> UNIQUE command isnot supported by mySQL (at least at MySQL 3.23.41- I am
> using)
>
> Hope this helps,
> M.Mamedov
>
>
> ----- Original Message -----
> From: "Justin Patrin" <papercrane@xxxxxxxxxxxxxxx>
> To: <php-db@xxxxxxxxxxxxx>
> Sent: Thursday, December 11, 2003 9:52 AM
> Subject:  Re: Very complex query
>
>
> > 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. Petrov
> >
> > Use unique(user_id). And please don't reply to a previous post when
> > posting a new thread....it screws up threading.
> >
> > --
> > paperCrane <Justin Patrin>
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.545 / Virus Database: 339 - Release Date: 27.11.2003
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.545 / Virus Database: 339 - Release Date: 27.11.2003

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux