Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 212
  • Last Modified:

php mysql update database what wrong with it

update
sellhead.NewCCode  = customer.id
where  AOL.sellhead inner join AOL.customer on sellhead.CCode = customer.Code
0
teera
Asked:
teera
  • 3
1 Solution
 
Raynard7Commented:
try

update sellhead, customer set sellhead.NewCCode  = customer.id where  sellhead.CCode = customer.Code
0
 
teeraAuthor Commented:
update  sellhead
set sellhead.NewCCode  = customer.id
where  AOL.sellhead inner join AOL.customer on sellhead.CCode = customer.Code
0
 
Raynard7Commented:
no,

you need to mention both tables at the beginning - then join them later

just as I gave - and as the examples in what I posted above.

so

update sellhead, customer set sellhead.NewCCode = customer.id where sellhead.CCode = customer.Code
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now