Welcome Guest, Not a member yet? Register   Sign In
How use more models in one controller?
#4

[eluser]Pitrsonek[/eluser]
THX for your answer but this code doesnt fix the problem.
Code:
<?php

class User extends Controller {

    function __construct(){
        parent::Controller();

        $this->load->library('layout', 'layout_client');        
        
    }
    
    function index(){
        $query = $this->db->query('SELECT * FROM POSTS');
        var_dump($query); echo '<br /><br />';
        $data['query2'] = $query->result();    
        
        $query->free_result();
        unset($query);
        
        $query = $this->db->query('SELECT * FROM USERS');
        var_dump($query);
        $data['query'] = $query->result();        
        
        $this->layout->view('welcome_message', $data);
    }
}
?&gt;

Content vardump query:

Code:
object(CI_DB_oci8_result)#13 (9) { ["stmt_id"]=>  resource(28) of type (oci8 statement) ["curs_id"]=>  NULL ["limit_used"]=>  NULL ["conn_id"]=>  resource(26) of type (oci8 persistent connection) ["result_id"]=>  bool(true) ["result_array"]=>  array(1) { [0]=>  array(7) { ["id"]=>  string(1) "1" ["created"]=>  string(9) "23-PRO-07" ["title"]=>  string(20) "Prvni pokusny clanek" ["seo_url"]=>  string(20) "prvni-pokusny-clanek" ["content"]=>  string(12) "asgasgasgasg" ["CATEGORY_ID"]=>  string(1) "1" ["user_id"]=>  string(1) "1" } } ["result_object"]=>  array(0) { } ["current_row"]=>  int(0) ["num_rows"]=>  int(1) }

object(CI_DB_oci8_result)#13 (9) { ["stmt_id"]=> resource(28) of type (oci8 statement) ["curs_id"]=> NULL ["limit_used"]=> NULL ["conn_id"]=> resource(26) of type (oci8 persistent connection) ["result_id"]=> bool(true) ["result_array"]=> array(1) { [0]=> array(7) { ["id"]=> string(1) "1" ["created"]=> string(9) "23-PRO-07" ["title"]=> string(20) "Prvni pokusny clanek" ["seo_url"]=> string(20) "prvni-pokusny-clanek" ["content"]=> string(12) "asgasgasgasg" ["CATEGORY_ID"]=> string(1) "1" ["user_id"]=> string(1) "1" } } ["result_object"]=> array(0) { } ["current_row"]=> int(0) ["num_rows"]=> int(1) }

Both query are same .-(


Messages In This Thread
How use more models in one controller? - by El Forum - 12-27-2007, 03:14 PM
How use more models in one controller? - by El Forum - 12-27-2007, 04:12 PM
How use more models in one controller? - by El Forum - 12-27-2007, 04:27 PM
How use more models in one controller? - by El Forum - 12-27-2007, 04:41 PM
How use more models in one controller? - by El Forum - 12-27-2007, 04:49 PM
How use more models in one controller? - by El Forum - 12-28-2007, 10:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB