Re: Combination of SQL statements invalid in MySQL?
| From: | Fred | Date: | Thu, 22 Nov 2001 17:33:43 +0000 |
| Subject: | Re: Combination of SQL statements invalid in MySQL? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-14544@lists.php.net to get a copy of this message | ||
Something similar is available using a FROM clause instead of a SELECT
clause, but it is only available in mysql 4.0.
Fred
Andy <news.letters@gmx.de> wrote in message
news:20011122151049.98574.qmail@pb1.pair.com...
> Hi there,
>
> I am trying to do a combination of SQL statements like described in a SQL
> bóok. Is it possible, that mysql does not allow this syntax?
>
> Thanx Andy
>
> Error:
>
> Occured during executing DELETE FROM test_user_interests WHERE user_id =
> (SELECT user_id FROM test_user WHERE user_name = 'herbert01') statement
>
> Error: 1064 You have an error in your SQL syntax near 'SELECT user_id FROM
> test_user WHERE user_name = 'herbert01') ' at line 3
>
>