Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

update query with join - syntax error

Status
Not open for further replies.

mrsbean

Technical User
Jul 14, 2004
203
US
Here's what is not working:

Code:
UPDATE tblmembership INNER JOIN tblduespaid ON tblmembership.wsuaaID = tblduespaid.wsuaaID SET tblmembership.userGroup =1 WHERE tblduespaid.Year =2006;

Something is wrong with my syntax near ' INNER JOIN '.

I'm using MySQL version 3.23.58.

MrsBean
 
I need a work-around. I could possibly write a PHP script, but I'm not sophisticated at all of this to lay out the steps. What other work-arounds might there be to do what I want to do?

MrsBean
 
could try:
UPDATE tblmembership
SET userGroup ='1'
WHERE tblmembership.wsuaaID = tblduespaid.wsuaaID
AND tblduespaid.Year ='2006';

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Thanks. I couldn't get it to work via SQl statement, so I went ahead and tackled the PHP script. Got it working, and it I guess the experience was good for me ;0)

It really stinks that the server is still running such an antiquated version of MySQL.

MrsBean
 
What server? Are you using a webhost? If the webhost didn't support Windows 95 would you be upset? that is about the age equivalent of using MySQL 3. You should therefore look to find a new webhost. They should be running mysql 4.1 not 4.0

If you are using a server where you have the ability to upgrade you should upgrade to mysql 5.
 
5 is a real big step, not for the faint hearted. later versions of 4 should be fine for 99% of folk on websites, bt 5 is a must for business intranets and extranets.

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top