I have problems writing one query.
For example, I have table with fields id and name which looks like
ID | Name
---+------
1 | John
2 | Ben
3 | Bob
And second table with fields name and somefield. I need to populate this table using data from first one so it looks like
name | somefield
-----+-----------
John | blah=1
Ben | blah=2
Bob | blah=3
So, value of name is name from first table and value of somefield is some phrase like blah=+id value from 1st table.
Is this possible with just mysql ?
I tried to do this using loop and wp wpdb class but wpdb kept throwing some malloc (i think) error after ~ each 30 row
Warning: This operation will lock
first_tablefor the duration of the operation. MySQL needs to do this in order to guarantee consistency during replication. This may be acceptable for a one-time data population but it’s probably not advisable to run this regularly on a high traffic production system.