XF 2.1 SQL Query Loop for Custom User Fields

frm

Well-known member
Is there an SQL query that can be run in a loop to do something like this for the count of members after adding a new custom field (else it says "No selection") that's required?

INSERT INTO xf_user_field_value ('user_id', 'field_id', 1) VALUES (i++, 'customField', 'Default Selection')

Or will I have to just turn to PHP to run a for loop?

Thanks
 
Back
Top Bottom