Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- update table1 as t1,table2 as t2 set t1.field1=t2.field2 where t1.uid=t2.uid;
- $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
- ->getQueryBuilderForTable('table1');
- $queryBuilder->getRestrictions()
- ->removeAll();
- $queryBuilder->update('table1')
- ->join('table1', 'table2', 't2',
- $queryBuilder->expr()->eq(
- 't2.uid',
- $queryBuilder->quoteIdentifier('table1.uid')))
- ->set(
- 'table1.field1',
- $queryBuilder->quoteIdentifier(
- 't2.field2'),
- false
- )->execute();
Add Comment
Please, Sign In to add comment