HI all'
mysql> select userGroup from machineGroup_userGroups where hostname="mulga";
+-----------+
| userGroup |
+-----------+
| staff |
| tech |
+-----------+
2 rows in set (0.01 sec)
mysql> select username from account where loginGroup="staff" OR
loginGroup="tech";
+----------+
| username |
+----------+
| aharwood |
| alistair |
....................... works fine
BUT
mysql> select username from account where loginGroup IN
-> (select userGroup from machineGroup_userGroups where
hostname="mulga") ;
ERROR 1064: You have an error in your SQL syntax near 'select userGroup
from machineGroup_userGroups where hostname' at line 2
Both loginGroup & userGroup are VAR(20)
Any idea what is wrong??
Thanks Vinita
Paul DuBois wrote:
> At 12:00 +1000 10/3/02, Chris Kay wrote:
>
>> Query ( that gets past the anti spam )
>>
>> Question is......
>>
>> I have a select where I want to get ID 15 && id 25
>>
>> Can I do something like WHERE ID = 15,25
>>
>> Or do I have to do WHERE ID = 15 && ID = 25
>
>
> ... WHERE ID IN (15,25)
>
>>
>> ---------------------------------------------------------
>> Chris Kay
>> Techex Communications
>> Website: www.techex.com.au Email: [EMAIL PROTECTED]
>> Telephone: 1300 88 111 2 - Fax: (02) 9970 5788
>> ---------------------------------------------------------
>
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php