Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

table names restored in lower case only

Status
Not open for further replies.

mrsbean

Technical User
Jul 14, 2004
203
US
I have exported a database from a MySQL database out on the web using phpMyAdmin to create the SQL for the export. I dumped that SQL code into a script tab in MySQL query browser (I have MySQL query browser locally, but cannot use it for the other database because it does not allow remote connections).

The database is created on my local server, and everything is there, but all of the table names are a bit different. In the first version, a table name might be phUser. In the local version, it is phuser.

I want to create an easy system for someone to make a backup of the online database and dump it into the local server. We will use MS Access to connect to the local version and do some fancy reporting. I know I could do some work-arounds for this (renaming my linked tables for instance) but I would like to have the table names come across correctly - not converted to all lower case. What can I do differently?

MrsBean
 
table and column names are not case sensitive. does it matter?
 
It matters with php code. When/if I want to move the application from the remote server to a local server, it matters.

MrsBean
 
why?

so long as you are writing your queries like this:
Code:
$sql = "Select somefield, someotherfield from sometable";
then the query will work and you can refer to the results as
$row['somefield']

etc
the key thing is not what the case is in the database but what you include in your query.
 
The code for the application is already written. It would be very cumbersome to re-write it. I was hoping to find a solution to the bizarre problem of the table names converting to all lower case in a windows environment. This doesn't happen when the SQL script is run on a Unix server.

MrsBean
 
mrsbean

is there a reason why you *must* use phpmyadmin?

if you used the code that i posted in your other thread on this topic, you should find that the case of the table and column names are preserved.

Justin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top