friends at joomla.stackexchange.com, I am in the same case discussed on https://stackoverflow.com/questions/11709043/mysql-update-column-with-value-from-another-table , this is, I need to copy the value of a column from tableA to tableB based on a common column in each table. I have used the suggested code inside of phpmyAdmin, and it works perfectly. UPDATE TableB SET TableB.value = ( SELECT TableA.value FROM TableA WHERE TableA.name = TableB.name ); My problem is that I have been unable to translate this into something that I can use inside of my mod_xxx.php file. On the same stackoverflow page, there is a suggested code that uses mysql_query and supposedly works, but Joomla doesn´t accept it. I know that any code has to be translated to Joomla's coding standards but I have spent three complete days trying it with no success. As you may guess, I am not knowledgeable on PHP coding, so I am in serious need of your help, please. My question is how can I translate the upper code into something that Joomla will take? Thank you very much in advance for any piece of advice.