mylo Posted November 22, 2008 Share Posted November 22, 2008 Hello, my problem is, that i have a foreign mysql database which can't be changed. It contains some tables. What i want to do is to create a small subset of this database and use the values of it in my own, cleaner, table structure. My problem is, how to do this? Should i use views, or triggers or what? I don't want do change the content, only the fieldnames and the amount of them. Quote Link to comment https://forums.phpfreaks.com/topic/133826-sync-one-table-with-an-other-alias-table/ Share on other sites More sharing options...
Mchl Posted November 22, 2008 Share Posted November 22, 2008 Read on FEDERATED storage engine Quote Link to comment https://forums.phpfreaks.com/topic/133826-sync-one-table-with-an-other-alias-table/#findComment-696525 Share on other sites More sharing options...
mylo Posted November 24, 2008 Author Share Posted November 24, 2008 Hm, maybe i get something wrong, but doc says: "The structure of this table must be exactly the same as that of the remote table..." which, in my case, is not the task. I need to be other than the source table. Quote Link to comment https://forums.phpfreaks.com/topic/133826-sync-one-table-with-an-other-alias-table/#findComment-697542 Share on other sites More sharing options...
Mchl Posted November 24, 2008 Share Posted November 24, 2008 I suppose, you would need to make a link to the remote table using FEDERATED engine, and then create a view, that would select those columns, that you need. I am not really sure, never done something like that. Quote Link to comment https://forums.phpfreaks.com/topic/133826-sync-one-table-with-an-other-alias-table/#findComment-697547 Share on other sites More sharing options...
mylo Posted November 24, 2008 Author Share Posted November 24, 2008 To clarify things, i need to "mix" fields from an existing table with "translated" fieldnames into a table with my own fields. Both tables reside on the same mysql server. Quote Link to comment https://forums.phpfreaks.com/topic/133826-sync-one-table-with-an-other-alias-table/#findComment-697574 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.