Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Diff way to up a database?
Old 01-11-2006, 11:08 AM Diff way to up a database?
Junior Talker

Posts: 4
Trades: 0
Is it possible to make a php file that would run a bunch of sql queres from your database backed up text file. so like it runs one line of it at a time every 1/4 of a second. Im sick of the MyPhpAdmin ... they have that 2.1mb file limit.
The-Chad is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-11-2006, 11:12 AM
Anacrusis's Avatar
Defies a Status

Posts: 2,099
Name: Adam
Location: Colchester CT
Trades: 0
That's not a limitation of phpMyAdmin, that is a serverwide PHP setting and you will hit that limit with any PHP script.

How is the file generated? Try compressing the file or gzipping the file when it is created. This should make the file a bit smaller.


Another option would be to manually FTP the file to the server and have a PHP script that processes the file at that point. The txt file is nothing more then a bunch of SQL statements, you can write a script that reads in the file and then executes the statements.

Last edited by Anacrusis; 01-11-2006 at 11:15 AM..
Anacrusis is offline
Reply With Quote
View Public Profile
 
Old 01-11-2006, 11:14 AM
Junior Talker

Posts: 4
Trades: 0
My database is 30MB. And I dont like copy and pasteing chunks of code at a time, i want a php script to do this for me, and it is generated as a normal text file.
The-Chad is offline
Reply With Quote
View Public Profile
 
Old 01-11-2006, 11:17 AM
Junior Talker

Posts: 4
Trades: 0
Quote:
Originally Posted by Anacrusis
That's not a limitation of phpMyAdmin, that is a serverwide PHP setting and you will hit that limit with any PHP script.

How is the file generated? Try compressing the file or gzipping the file when it is created. This should make the file a bit smaller.


Another option would be to manually FTP the file to the server and have a PHP script that processes the file at that point. The txt file is nothing more then a bunch of SQL statements, you can write a script that reads in the file and then executes the statements.
thats wat i want to do, but im having problems doing it, how do i pull one line at a time.
The-Chad is offline
Reply With Quote
View Public Profile
 
Old 01-11-2006, 04:36 PM
Anacrusis's Avatar
Defies a Status

Posts: 2,099
Name: Adam
Location: Colchester CT
Trades: 0
I had to do this myself recently and found this:
http://lars.targetit.ro/index.php?pa...try&post_id=36

Let me know if it helps... it helped me.
Anacrusis is offline
Reply With Quote
View Public Profile
 
Old 01-11-2006, 06:05 PM
Junior Talker

Posts: 4
Trades: 0
so theres nothing like this out there, like a quick fix.
The-Chad is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Diff way to up a database?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.29542 seconds with 12 queries