On 4/8/20 12:00 PM, Robert Savickas wrote:

> 1) is it possible to add users from a file that contains their information,
> rather than one-by-one. If I have 50 students in class, or more, it would
> be more efficient to use a file. 

You could try the following, it might work and it might not. **Make
a full dump with create statements of your OM database before you
try it.**

INSERT INTO address (country,email) VALUES ('US','[email protected]');
INSERT INTO om_user 
(deleted,inserted,displayName,firstname,forceTimeZoneCheck,language_id,lastname,login,regdate,show_contact_data,show_contact_data_to_contacts,time_zone_id,type,address_id)
 SELECT b'0',NOW(),'Robert 
Savickas','Robert',b'0','1','Savickas','robertsavickas',NOW(),b'0',b'0','America/Los_Angeles','USER',
 id from address where email = '[email protected]';

If this achieves what you need, you can script the creation of the
SQL statements with awk from a CSV.

Cheers,

Z

Reply via email to