Welcome Guest, Not a member yet? Register   Sign In
Can´t select data PDO with CI 2.2.1
#1

(This post was last modified: 04-08-2015, 06:24 AM by Jacker.)

[UPDATE]
Does not mater if it is a JOIN. I can´t get data period.

So this does not work:
$this->db->get('objects');

This will return nothing. However this will work:
$data = array(
'moName' => 'something'
);
$this->db->insert('objects', $data);

So there should not be anything about file/directory rights.
[/UPDATE]

So i had this problem (CI 2.2.0):
http://forum.codeigniter.com/thread-6130...#pid315991

I upgraded to CI 2.2.1 and now i can´t fetch JOIN data...wonderful!

Tried the generated SQL string directly in my SQLLite DB and it will fetch at least 4 posts. But when i run it using CI...nothing will get back.

I skimmed the change log and it should not behave like this:

PHP Code:
       $this->db->select("*");
 
       $this->db->from("objects");
 
       $this->db->join("objects_data""objects.moId = objects_data.modObject");
 
       $this->db->join("component_types""objects.moComponenttype = component_types.mctId");
 
       $this->db->where("objects.moType = 'page'"); 
 
       $query $this->db->get();
 
       print_r($query); 

This will generate the SQL string that will WORK when executed in the SQLLite db.:
SELECT *
FROM objects
JOIN objects_data ON objects.moId = objects_data.modObject
JOIN component_types ON objects.moComponenttype = component_types.mctId
WHERE objects.moType = 'page'
Reply


Messages In This Thread
Can´t select data PDO with CI 2.2.1 - by Jacker - 04-08-2015, 04:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB