If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > UPDATE using SELECT

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-06-04, 12:54
adegutis adegutis is offline
Registered User
 
Join Date: Aug 2004
Posts: 4
UPDATE using SELECT

I'm trying to do the following but MySQL is complaining about a syntax error:

UPDATE `groupmaster`
SET reccount =
(SELECT count(ID) FROM `allgroups` WHERE groupname = 'group1')
WHERE groupname = 'group1'

What am I doing wrong?

Thanks
Al
Reply With Quote
  #2 (permalink)  
Old 08-08-04, 22:40
J.D. J.D. is offline
Registered User
 
Join Date: May 2004
Location: NJ USA
Posts: 21
The stable version of mySQL does not support sub-queries....
__________________
J.D.
Database Administrator
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On