List:General Discussion« Previous MessageNext Message »
From:Steffan A. Cline Date:July 15 2007 1:53am
Subject:New error to me...
View as plain text  
I was trying to reduce a set of queries and ran into this:


insert into forums (forum_reply_id, forum_dev_id, forum_subject,
forum_message) values (0, 1, (select forum_subject from forums where
forum_id=3 ), "I figured this one needed a reply too.")

yields:

error: You can't specify target table from 'forums' for update in from
clause

I read somewhere online when they referenced 4.x that said you cannot do
subqueries in an update. Is this true of 5.x ?

Thanks

Steffan

---------------------------------------------------------------
T E L  6 0 2 . 5 7 9 . 4 2 3 0 | F A X  6 0 2 . 9 7 1 . 1 6 9 4
Steffan A. Cline
Steffan@stripped                             Phoenix, Az
http://www.ExecuChoice.net                                  USA
AIM : SteffanC          ICQ : 57234309
                                  Lasso Partner Alliance Member
---------------------------------------------------------------



Thread
New error to me...Steffan A. Cline15 Jul
  • Re: New error to me...Mogens Melander15 Jul
    • Re: New error to me...Steffan A. Cline15 Jul
  • Re: New error to me...Paul DuBois15 Jul