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
https://forums.phpfreaks.com/topic/164917-solved-why-wont-this-work/
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

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. 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.