never tried this before, but do you need some single quote's around the
whole "(select user_id.....)"?
then of course there'd need to be some escape character for the single
quotes in the "user_name = 'herbert01'" bit...
let me know if that is the problem, as this is just a guess!
cheers,
  Matt

-----Original Message-----
From: Andy [mailto:[EMAIL PROTECTED]]
Sent: 22 November 2001 15:09
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Combination of SQL statements invalid in MySQL?


Hi there,

I am trying to do a combination of SQL statements like described in a SQL
bok. 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



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01
 

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to