Re: [PHP-DB] Re: Very complex query

2003-12-11 Thread Justin Patrin
Martin Marques wrote: El Jue 11 Dic 2003 05:30, Mike U. Petrov escribió: I tried to use GROUP BY and it worked almost right but i need to return user_id and mysql generated an error that notes.user_id isn't used in GROUP BY... Add it to the GROUP BY. But he wants only one entry for user_id, no

Re: [PHP-DB] Re: Very complex query

2003-12-11 Thread Martin Marques
El Jue 11 Dic 2003 05:30, Mike U. Petrov escribió: > I tried to use GROUP BY and it worked almost right but i need to return > user_id and mysql generated an error that notes.user_id isn't used in GROUP > BY... Add it to the GROUP BY. -- 16:33:02 up 15 days, 22:49, 4 users, load average: 0.03

Re: [PHP-DB] Re: Very complex query

2003-12-11 Thread Martin Marques
El Jue 11 Dic 2003 05:17, Mike U. Petrov escribió: > No, DISTINCT isn't match my purpose cause of it rerurns unique rows but I > need ONE user_id per one object_id. GROUP BY is your answer. -- 15:51:02 up 15 days, 22:07, 3 users, load average: 0.90, 0.75, 0.61

Re: [PHP-DB] Re: Very complex query

2003-12-11 Thread Martin Marques
El Jue 11 Dic 2003 05:00, Muhammed Mamedov escribió: > You can also DISTINCT command instead. > UNIQUE command isnot supported by mySQL (at least at MySQL 3.23.41- I am > using) UNIQUE is for table creation or index creation. It is relevent for insertion, not selects. DISTINCT and DISTINCT ON() a

RE: [PHP-DB] Re: Very complex query

2003-12-11 Thread Mike U. Petrov
EMAIL PROTECTED] Subject: Re: [PHP-DB] Re: Very complex query Mike U. Petrov wrote: > First, sorry my starnge way to post new thread. > Second: > I want to specify some features: > in my table notes I've a lot of user_id's for each object_id and I don't > want to

Re: [PHP-DB] Re: Very complex query

2003-12-11 Thread Justin Patrin
Mike U. Petrov wrote: First, sorry my starnge way to post new thread. Second: I want to specify some features: in my table notes I've a lot of user_id's for each object_id and I don't want to find unique user_id, I only want to find one user_id for each object_id, so unique(user_id) doesn't match.

Re: [PHP-DB] Re: Very complex query

2003-12-11 Thread Muhammed Mamedov
ay, December 11, 2003 10:17 AM Subject: RE: [PHP-DB] 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 [ma

RE: [PHP-DB] Re: Very complex query

2003-12-11 Thread Mike U. Petrov
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:[EMAIL PROTECTED] Sent: Thursday, December 11, 2003 11:01 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-D

Re: [PHP-DB] Re: Very complex query

2003-12-11 Thread Muhammed Mamedov
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" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 11, 2003 9:52 AM Subject: [PH

RE: [PHP-DB] Re: Very complex query

2003-12-11 Thread Mike U. Petrov
First, sorry my starnge way to post new thread. Second: I want to specify some features: in my table notes I've a lot of user_id's for each object_id and I don't want to find unique user_id, I only want to find one user_id for each object_id, so unique(user_id) doesn't match. Do u have any other id