|
|
 |
mysql problem - was Re: FN-FORUM: OT: Agony Aunt (lol) require
date posted 6th January 2005 23:04
Sorry - forgot to change the subject.
hmm - I can't think how it can be done using a join at the moment. I thought
about using a join originally but couldn't see how.
Pam
----- Original Message -----
From: "Rob Hull" [EMAIL REMOVED]
To: [EMAIL REMOVED]
Sent: Friday, January 07, 2005 12:04 AM
Subject: Re: FN-FORUM: OT: Agony Aunt (lol) require
>
> Currently supported mySQL versions (4.0.20?) don't allow sub-selects,
> which
> I think that is what this is. It's very confusing becuase sub-selects are
> talked about in the online documentation but only for versions above the
> current release!
>
> I guess you would have to re-write the statment using some kind of join.
>
> Rob
>
>>
>> I have the following select for a Mysql Database:-
>>
>> SELECT DATE_FORMAT(Sent_Date,'%d-%m-%Y') AS Date_Sent,
>> Sent_from_Member_Id
>> FROM messages where Member_Id = '61' AND Sent_from_Member_Id NOT IN
> (Select
>> Blocked_Member_Id from blocked_members where User_Name = 'dd')
>>
>> but I am getting
>>
>>
>> Error in selecting records from the Messages table in the database - You
>> have an error in your SQL syntax near 'Select Blocked_Member_Id from
>> blocked_members where User_Name = 'dd')' at line 1
>>
>> I can't see anything wrong. Can't you use the in statement for MYsQL?
>>
>> Thanks
>> Pam
>
>
> --
> Freelancers, contractors earn more with Prosperity4
> Call 0870 870 4414 or visit www.prosperity4.com
> and benefit from Inland Revenue approved expenses today.
>
> To advertise here: http://www.freelancers.net/advertising.html
>
> |
 |
|