RE: [PHP-DB] Combination of SQL statements invalid in MySQL?

From: Date: Thu, 22 Nov 2001 15:16:37 +0000
Subject: RE: [PHP-DB] Combination of SQL statements invalid in MySQL?
Groups: php.db 
Request: Send a blank email to php-db+get-14533@lists.php.net to get a copy of this message
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:news.letters@gmx.de] Sent: 22 November 2001 15:09 To: php-db@lists.php.net 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 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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net --- 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

« previous php.db (#14533) next »