Welcome Guest, Not a member yet? Register   Sign In
clear active record
#2

[eluser]Cesar Kohl[/eluser]
To load everything on a table, use this code:

Code:
$query = $this->db->get('mytable');

Read the User Guide to have more information: http://ellislab.com/codeigniter/user-gui...ecord.html

You need to put the query in different strings:

Code:
$author = 'Cesar';
$this->db->select('id_author');
$this->db->where('name',$author);
$query_id_author = $this->db->get('authors');

$query_id_author->result();

$this->db->select('id_author');
$this->db->where('lastname','Kohl');
$query_id_author2 = $this->db->get('authors');

$query_id_author2->result();

At least is what I do and I never had your problem.


Messages In This Thread
clear active record - by El Forum - 12-14-2010, 07:08 AM
clear active record - by El Forum - 12-14-2010, 07:26 AM
clear active record - by El Forum - 12-14-2010, 07:44 AM
clear active record - by El Forum - 12-14-2010, 07:46 AM
clear active record - by El Forum - 12-14-2010, 07:50 AM
clear active record - by El Forum - 12-14-2010, 08:41 AM
clear active record - by El Forum - 12-14-2010, 08:47 AM
clear active record - by El Forum - 12-14-2010, 09:05 AM
clear active record - by El Forum - 12-14-2010, 09:46 AM
clear active record - by El Forum - 12-14-2010, 09:47 AM
clear active record - by El Forum - 12-14-2010, 11:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB