Solved

php mysql update database what wrong with it

Posted on 2006-11-07
4
197 Views
Last Modified: 2011-10-03
update
sellhead.NewCCode  = customer.id
where  AOL.sellhead inner join AOL.customer on sellhead.CCode = customer.Code
0
Comment
Question by:teera
  • 3
4 Comments
 
LVL 35

Accepted Solution

by:
Raynard7 earned 350 total points
ID: 17895796
try

update sellhead, customer set sellhead.NewCCode  = customer.id where  sellhead.CCode = customer.Code
0
 
LVL 35

Expert Comment

by:Raynard7
ID: 17895798
0
 

Author Comment

by:teera
ID: 17895819
update  sellhead
set sellhead.NewCCode  = customer.id
where  AOL.sellhead inner join AOL.customer on sellhead.CCode = customer.Code
0
 
LVL 35

Expert Comment

by:Raynard7
ID: 17895837
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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Button Click 11 26
Modify PHP Code on the Fly? 8 43
Editing login page in zencart. 2 15
Insert data into database 2 15
Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now