Welcome Guest, Not a member yet? Register   Sign In
I can't connect SQLite3 in codeigniter1.6.0......
#1

[eluser]Unknown[/eluser]
I can connected SQLite3 using the PDO_SQLite3, but when I update to 1.6.0,have a wrong message in it:"Fatal error: Call to undefined method CI_DB_pdo_driver::db_set_charset() in D:\www\system\database\DB_driver.php on line 198"

what can I do?

thank's!
#2

[eluser]Derek Allard[/eluser]
Sorry to hear it szlinz. Could you file a bug report for me? In the meantime, open up your

$db['default']['char_set'] = "utf8";

And change utf8 to TRUE

That help?
#3

[eluser]Unknown[/eluser]
my god! this problem let me crazy, It still can't work when I using your method. so I have to turn to CI1.5.4.
#4

[eluser]M'hand[/eluser]
Using the default sqlite driver :
SQL logic error or missing database caused by special quotes : `
I remove theme and it works.
Can we disable `item` protection in config?
#5

[eluser]Derek Allard[/eluser]
Yes. Aplogoies, open up system/database/drivers/sqlite/sqlite_driver.php and look for the _protect_identifiers() function on 425. Do a search and replace, and remove all "`" from it.

If I can get confirmation from any other user, I'll remove them from CI permanently (apologies, but I don't have access to sqlite).
#6

[eluser]M'hand[/eluser]
backquote is not part of the SQL standard, MySQL first implemented it, then some other implementations follow.
I have just red that the latest SQlite supports it.

By the way : my firstname is badly printed on the forum : M'hand should be M'hand

EDIT : SQlite is fine in 1.6.1, thank you!
#7

[eluser]quindo[/eluser]
Hello,

I've had the same error that slinz report in the start of the thread.
Differences:
codeigniter 1.6.1 instead of 1.6.0
line 175 instead of 198

I 'solved' this by copying the db_set_charset function from sqlite_driver.php.
This function just returns TRUE

After this alteration I was able to connect to the database.
Next step: trying to enter and retrieve some data :-)

Greetz.
#8

[eluser]Unknown[/eluser]
Issue I have could be related to this. I use CI 2.1.4. and sqlite.

This one works:
Code:
$query = $this->db->get('maps');
SQL: SELECT * FROM (maps)

This one does not work:
Code:
$query = $this->db->get_where('maps', array('mapid' => $mapid));
SQL: SELECT * FROM (maps) WHERE mapid = '1'
SQL logic error or missing database

This works when run manually: SELECT * FROM 'maps' WHERE mapid = '1'

Is this issue in sqllite side or CI side ? and how to fix please ?

Thanks.





Theme © iAndrew 2016 - Forum software by © MyBB