After doing some digging around, I managed to cobble together a MySQL statement which isn't perfect, but does a good enough job for me.
Firstly, looks like I was wanting to take the NAME field from the "jos_users" table and dump it into the FIRSTNAME and LASTNAME fields for "jos_comprofiler".
Here's the MySQL Query that did the trick for me:
Code:
update `jos_comprofiler`,`jos_users` SET firstname = substr(`jos_users`.`name`,1,instr(`jos_users`.`name`,' ')-1), lastname = substr(`jos_users`.`name`,instr(`jos_users`.`name`,' ')+1) where `jos_comprofiler`.`id` = `jos_users`.`id`;
Quirks of this one-line fix:
If the users' names have two fields (e.g. John Doe) everything works as expected.
If the users' names have a single name (e.g. Prince), their one name will show up as their last name and their first name will be blank.
If the users' names have two first names or a middle initial (e.g. Mary Ann or Harry S Truman), everything after their first name is dumped into their last name field.
It may not be good enough for your needs, but seeing as there wasn't anything I could search for on the boards here talking about it, this should at least give you a good starting point if you want to tweak it for your needs.
Caveat: Use at your own risk. It worked for me as I said, and it'll probably work for you, but try testing it out on a blank table first or something.
-creativedynamo