Welcome Guest, Not a member yet? Register   Sign In
Restore MySQL DB with CI?
#1

[eluser]Horvat[/eluser]
Is there some special function to automatically restore db?

How to do it? Any examples?
#2

[eluser]Horvat[/eluser]
BUMP
#3

[eluser]thebigpj[/eluser]
You need to explain your situation and what you have tried. The question is too vague.
#4

[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.
#5

[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.
#6

[eluser]Horvat[/eluser]
and how to clear data and repopulate database?
any good example
#7

[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
#8

[eluser]Horvat[/eluser]
LOL Big Grin
#9

[eluser]Horvat[/eluser]
sorry, where do you see example for REPOPULATE database?
#10

[eluser]thebigpj[/eluser]
Your question was very vague with little information so yes the only response I could give you is 'RTFM' Big Grin




Theme © iAndrew 2016 - Forum software by © MyBB