Multiple update query

kouros91

Member
Hi. I would like to make a query with multiple fields update in a single query. But
that doesn't work
My code :
PHP:
$myDb = JFactory::getDbo();
$myQuery = $myDb->getQuery(true);
$myQuery
   ->update('table_adhcont2')
   ->innerJoin('table_temp on table_temp.userid = table_adhcont2.id')
   ->set('table_adhcont2.nbjoursavtecheance = table_temp.nbjoursavtecheance'.' and '.'table_adhcont2.imagealertefinadhesion = table_temp.imagealertefinadhesion' );
$myDb->setQuery($myQuery);
// dump((string)$myQuery, 'update query');
$myDb->execute();
Thank you for help
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top