Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-26-2005, 09:09 AM   PM User | #1
eshban
Regular Coder

 
Join Date: Apr 2005
Location: Lahore, Pakistan
Posts: 150
Thanks: 2
Thanked 0 Times in 0 Posts
eshban is an unknown quantity at this point
how to upload mysql database file to any server

How to upload MYSQL database file(*.sql) to a server . Because my hosting provider does not have a powerful control panel. I just know the username, password and ip address of the server on which i can upload database file.

plz reply
eshban is offline   Reply With Quote
Old 06-26-2005, 02:50 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
The easiest way would be to create an upload directory, read the file contents and follow the instructions.
.sql files contain a query on a single line of instruction. file() is a good option to use if you create a temporary file for it. Otherwise, you would need to create an array out of your temporary data by exploding it on each newline.
From that point, running a query would be a cinch. The trickier part will be to impliment some sort of security and control to it.
Will this be enough to help, or would you like a quick example?

Edit:
Sorry, I lied. It appears not all queries are stored on newlines, create table for instance is on multiple lines.
I'll look into it a little more for the best route. Worse come to worse, use xml.

Last edited by Fou-Lu; 06-26-2005 at 02:56 PM..
Fou-Lu is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:42 PM.


Advertisement
Log in to turn off these ads.