Welcome Guest, Not a member yet? Register   Sign In
Storing id to the session
#11

[eluser]haris244808[/eluser]
[quote author="TheFuzzy0ne" date="1362938399"]In your controller, insert the line $this->output->enable_profiler(TRUE), and you'll be able to see exactly what queries are being fired at the server. Smile[/quote]
thank you man i am learning new things from you...

from profiler i says :
SELECT * FROM files WHERE user_id = 0

which means that it didnt get the ID from the session :S
#12

[eluser]haris244808[/eluser]
actually hear

i am not getting the ID in proper way i think:


$data = array(
'username' => $this->input->post('username'),
'id' => $query->id,
'is_logged_in' => TRUE
);
#13

[eluser]TheFuzzy0ne[/eluser]
Aaah, sorry. Blonde moment...

If you're only expecting a single row to be returned, use $query->row(). $query->result() returns an array of objects.
#14

[eluser]haris244808[/eluser]
[quote author="TheFuzzy0ne" date="1362938815"]Aaah, sorry. Blonde moment...

If you're only expecting a single row to be returned, use $query->row(). $query->result() returns an array of objects.[/quote]

no no i am expecting an array of objects actually...
it should return all the rows that has the ID of the user logged in
#15

[eluser]haris244808[/eluser]
ok man i did what i want...

Again thank you for helping Smile




Theme © iAndrew 2016 - Forum software by © MyBB