Moodle -Query to change all users details

UPDATE mdl_user 
SET
username=CONCAT('username',mdl_user.id),
phone1=CONCAT('11111',mdl_user.id),
phone2=CONCAT('11111',mdl_user.id),
firstname=CONCAT('Name',mdl_user.id),
lastname=CONCAT('Last',mdl_user.id),
email=CONCAT('email',mdl_user.id,'@test.com'),
idnumber= CONCAT('1000',mdl_user.id,'2000')
WHERE id>=7

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.