Hi,
If you expect only 1 result you can try:
select (@myvar:=ID_ALBUM) from Bands where ID_GROUP='$group';
delete from Bands where ID_ALBUM=@myvar;

Good luck,
Gelu

----- Original Message -----
From: Riccardi Moreno <[EMAIL PROTECTED]>
To: Php List <[EMAIL PROTECTED]>; Mysql List <[EMAIL PROTECTED]>
Sent: Wednesday, March 13, 2002 5:48 PM
Subject: Delete problem


> Hi all,
>
> I'm trying to delete records with this query on php program:
> delete from Bands where ID_ALBUM IN (select ID_ALBUM from Albums where
> ID_GROUP = '$group')
> I use it on MSSQL and work fine but on mysql don't work, there's some
other
> query that make the same result on mysql
> Thank's all
> --------------------------------------------
>
> - Moreno Riccardi
> - www.webtrade.it
>
> --------------------------------------------
>
>
> ---------------------------------------------------------------------
> 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

Reply via email to