working with sqlite |
[eluser]Pavellicus[/eluser]
Hello, i have a little question : i need to create a library to work on sqlite file . i need to upload the *.sqlite and then open it and work on it . is possible do something like that : Code: class myLibrary extends sqlite3{
[eluser]InsiteFX[/eluser]
Sqlite is built into CI it has its own driver so yes you can use it. Search the forums for more info on it.
[eluser]Pavellicus[/eluser]
yes but i have already a connection open on a Mysql ( in config/database.php i put inside the paramiters) i can already open this connection ?
[eluser]InsiteFX[/eluser]
Then do a forum search on using multiple database configurations with the conn->id
[eluser]CroNiX[/eluser]
See "Connecting to Multiple Databases" section: http://ellislab.com/codeigniter/user-gui...cting.html
[eluser]Pavellicus[/eluser]
Code: $db['default']['hostname'] = 'sqlite:'.APPPATH.'sqlite/blabla.sqlite'; and then Code: $db = $this->load->database(); doesn't go but if i do Code: $this->db->simple_query('SELECT * FROM table');/* it's works... why????????
[eluser]Tpojka[/eluser]
Manual says next: For example, when using SQLite you will not need to supply a username or password, and the database name will be the path to your database file. You don't have db name in configuration. |
Welcome Guest, Not a member yet? Register Sign In |