Jump to content

[SOLVED] Why won't this work?


RynMan

Recommended Posts

Hey guys, here's my code....

 

UPDATE tblclientcvdetails SET `tblclientcvdetails`.`KAMClientID2` = `tblclientinformation`.`KAMClientID2` WHERE  `tblclientcvdetails`.`KAMClientID` = `tblclientinformation`.`KAMClientID`

 

PHPMyAdmin is giving me the following error....

 

#1054 - Unknown column 'tblclientinformation.KAMClientID' in 'where clause'

 

All fields and tables are spelled correctly.  Anyone know why this may be happening??

Link to comment
Share on other sites

I am guessing you are using the "field" selector on the right side in PHPMyAdmin. If so, it is inserting the ` marks which are probably causing the issue.

 

If you remove the ` marks between the column and table names it should work.

 

UPDATE tblclientcvdetails SET `tblclientcvdetails.KAMClientID2` = `tblclientinformation.KAMClientID2` WHERE  `tblclientcvdetails.KAMClientID` = `tblclientinformation.KAMClientID`

 

 

If that doesn't remove them all.

 

UPDATE tblclientcvdetails SET tblclientcvdetails.KAMClientID2 = tblclientinformation.KAMClientID2 WHERE  tblclientcvdetails.KAMClientID = tblclientinformation.KAMClientID

Link to comment
Share on other sites

Hey guys, thanks for the responses.  I tried with and without the '. 

 

What it ended up being was that I needed to list both tables right after the "UPDATE".  So it ended up being....

 

UPDATE tblclientcvdetails, tblclientinformation etc

 

Didn't think I actually had to do that, but whatever - it worked. 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.