|
From: Craig P J. <cpj...@th...> - 2004-01-27 20:28:12
|
I have updated the eTest database to use the new tabale names with the etest prefix. All table names now are the old name prefixed with etest_ (i.e. etest_instructor, etest_questions, etc...). The DB_PREFIX and $DB_prefix values are set in the configure file, so all you should have to change in your code is adding the prefix before every table name. If you coded your queries properly you should just be able to paste the following into your code immediatly before everytable name: ".$DB_prefix."_ pasting this into this query: $query = "SELECT * FROM student WHERE Student_Code = '$username'"; will change it to this query: $query = "SELECT * FROM ".$DB_prefix."_student WHERE Student_Code = '$username'"; which works properly. remember this needs to be done before everytable name in the query, not just the FROM part. If you have a join it must be on both, and if you reference a specific field in the query (i.e. student.Student_Code) that must be changed also (i.e. $DB_prefix."_student.Student_Code). Once, you make the changes, remember that all new development and queries will use the new prefix structure. This allows the user to specify his own prefix if he wants or else use the default prefix of etest. Any questions, let me know craig |