Can I import sql with php?
Posted
by shin
on Stack Overflow
See other posts from Stack Overflow
or by shin
Published on 2010-04-05T20:46:31Z
Indexed on
2010/04/05
20:53 UTC
Read the original article
Hit count: 396
Please bear with me(beginner).
I am planning to set up an application where visitors can login and play/mess around with my application.
So I want to refresh my php application once a day with a cron job.
But I never wrote a cron job script before.
I understand that I have to truncate all the tables/data and add the initial data.
With phpmyadmin, I can import data. Is there any way I can import sql file after truncate the tables?
What is the best way?
Do I have to create table and insert all data?
Help and resources will be appreciated.
Thanks in advance.
© Stack Overflow or respective owner