does anyone know how to merge to tables? Table1_members needs to receive all the fields and setting in Table2_users. anyone know hwo to do this merge either via shell or phpmyadmin
Mysql expert needed...
Collapse
X
-
no not identical. they're both in the same database though. one is rate_members and the other is phpbb_users. i need all the fields with there settings from phpbb_users (with the exception of username and user_id, i'll drop those fields) moved/copied to rate_members.
i've check both tables and there won't be a overlapping problem since all fields in phpbb_users are uniqueComment
-
the way we would do it is first create a duplicate of the destination via phpmyadmin (operations>copy table with data/structure) then write a simple php script to read the one you want to merge, and as you loop thru the results, import to the duplicate version passing only the variables that are required to make the entry valid in the copy. Once you confirm the data is correct, u can rename the tables via the same way (operations>rename) and make it live without any hiccups.
Promote ONE Legal Tube Site, Collect Checks from 19 Sponsors

Fresh Dave | Email: [email protected] | ICQ: 317160390

Comment
-
Originally posted by Dave Guruthe way we would do it is first create a duplicate of the destination via phpmyadmin (operations>copy table with data/structure) then write a simple php script to read the one you want to merge, and as you loop thru the results, import to the duplicate version passing only the variables that are required to make the entry valid in the copy. Once you confirm the data is correct, u can rename the tables via the same way (operations>rename) and make it live without any hiccups.
Comment
-
Only non mysql experts would do that. If you really know mysql you could do it by using a query. Whenever I need stuff done I go to expertsexchange.com, post my question and within minutes i have a query.Originally posted by Dave Guruthe way we would do it is first create a duplicate of the destination via phpmyadmin (operations>copy table with data/structure) then write a simple php script to read the one you want to merge, and as you loop thru the results, import to the duplicate version passing only the variables that are required to make the entry valid in the copy. Once you confirm the data is correct, u can rename the tables via the same way (operations>rename) and make it live without any hiccups.Comment
-
unless there is data to change I also see no need for this, sql is very powerful and most php programmers hardly know how to do anything but INSERT and SELECT lolOriginally posted by FuqALotOnly non mysql experts would do that. If you really know mysql you could do it by using a query. Whenever I need stuff done I go to expertsexchange.com, post my question and within minutes i have a query.money talks and bullshit walks.Comment
-
-
The real question here is: why in gods name do you want to do that?!
Either learn how to do joins, or if you use mysql 5, setup a damn view."Think about it a little more and you'll agree with me, because you're smart and I'm right."
- Charlie MungerComment
-
to each his own - if one of your buddies at expertsexchange gives you an incorrect query, its gonna fuck shit upOriginally posted by FuqALotOnly non mysql experts would do that. If you really know mysql you could do it by using a query. Whenever I need stuff done I go to expertsexchange.com, post my question and within minutes i have a query.
the safest way of going about it is as i described.
Promote ONE Legal Tube Site, Collect Checks from 19 Sponsors

Fresh Dave | Email: [email protected] | ICQ: 317160390

Comment


Comment