I have two very big databases, with two big scripts (forum and shop), and I'm trying to get them to use only one username/password,
So what I'm going to do is move all the tables from one db to the other, and merge the two user tables together.
However, in one table, the fields for username and password are "user" and "pass"
In the other thable, the fields are "username" and "password"
So i can either go through the code of one of the scripts and find every single instance of the word "user" and change it to "username", or there is another way to do it.
Is there some way that in the field for "user" i can tell it to go look in the "username" field?
Or any other ways to accomplish this?
essentially, no, you would need to do code changes to that the applications refer to the correct field name.
in mysql 5.0 with the introduction of views it would be possible but that is not really available for production use yet.
to save doing all those code changes you could do a hack... create the table with the fields user, username, pass, password... then change the application code of both to update all the fields. you'd be duplicating data (storing it in two places istead of one, which is the whole point of a relational database) but it might save effort.