Restore MySQL DB with CI? |
[eluser]Horvat[/eluser]
Is there some special function to automatically restore db? How to do it? Any examples?
[eluser]thebigpj[/eluser]
You need to explain your situation and what you have tried. The question is too vague.
[eluser]Horvat[/eluser]
For example, I have database in sql file, and everytime I want to restore, something like default db, I want my db to change with default values as set in sql file.
[eluser]thebigpj[/eluser]
If you have access to the sql file on your server you could replace the sql file on the server with the default one. If you want a code solution then you would need to pass the database some SQL queries to clear the data and then repopulate the database with these values.
[eluser]Horvat[/eluser]
and how to clear data and repopulate database? any good example
[eluser]thebigpj[/eluser]
http://ellislab.com/codeigniter/user-gui...index.html Will show you with a basic example of how to populate the database. Alternatively and after you should read the database Class documentation: http://ellislab.com/codeigniter/user-gui...index.html
[eluser]Horvat[/eluser]
sorry, where do you see example for REPOPULATE database?
[eluser]thebigpj[/eluser]
Your question was very vague with little information so yes the only response I could give you is 'RTFM' ![]() |
Welcome Guest, Not a member yet? Register Sign In |