Can I import sql with php?
- by shin
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.