Welcome Guest, Not a member yet? Register   Sign In
CI 2.0 and sqlite
#1

[eluser]Andy Fraley[/eluser]
Has anyone been able to get CI 2.0 to work with sqlite3?

I can get it to work with sqlite2, however, I've run into some road blocks with the way some queries are returned. Take the following table called users:

user_id first_name last_name

If I do
Code:
select * from users
everything works fine. If I do a print_r on the query->result() I get
Code:
stdClass Object ( [user_id] => 1 [first_name] => john [last_name] => doe )

However, if I do
Code:
select users.user_id, users.first_name, users.lastname from users
then do a print_r I get
Code:
stdClass Object ( [users.user_id] => 1 [users.first_name] => john [users.last_name] => doe )

I then cannot access the object normally. In the first query I can do
Code:
echo $user->user_id;
but with the results returned by the second query it doesn't work. I'm not sure how to even address it. I can't do
Code:
echo $user->users.user_id




Theme © iAndrew 2016 - Forum software by © MyBB