Welcome Guest, Not a member yet? Register   Sign In
Help with firebird driver
#1

[eluser]Unknown[/eluser]
Hello to all. First of all, i am new to codeigniter, and second i got already stuck. Smile

I have firebird database on localhost which is working fine. ( I can access it through IBExpert)

I am using newest codeIgniter framework (2.1.0)

First i downloaded drivers from Carlos Garcia
Code:
https://github.com/cgarciagl/Firebird-for-Codeigniter

Set up all correctly(I think) and when I test a query i got result like this:

Code:
CI_DB_Firebird_result Object
(
    [conn_id] => Resource id #28
    [result_id] => Resource id #33
    [result_array] => Array
        (
        )

    [result_object] => Array
        (
        )

    [custom_result_object] => Array
        (
        )

    [current_row] => 0
    [num_rows] => 1
    [row_data] =>
)

Than i downloaded ibase drivers from codeigniter wiki:
Code:
http://codeigniter.com/wiki/File:ibase.zip/

also followed setup steps, and now i got error like this:
Code:
Fatal error: Class 'CI_Language' not found in C:\...DB_driver.php on line 1046

If someone can, please help!

This is the code from the model class:

Code:
public function getAll() {
    $sql = "SELECT * FROM {$this->table_name}";
    $query = $this->db->query($sql);
    if ($query->num_rows() > 0) {
      return $query;
    } else {
      return false;
    }
  }

Thanks in advance!
P.S I would prefer to use first driver...and Sorry for my bad english! cheers
#2

[eluser]Carlos G[/eluser]
Hi Marko,

I have tested your function with the last version of my driver and works good, here is the way i've tested it:

Code:
$q = $this->getAll();
$this->load->library('table');
echo $this->table->generate($q);

please download the last versión of the driver from the github repository and you could checkit...

if you are doing a var_dump of the query object not all the properties of the object are showed completely, but you still can use the result functions like result_array() or result_object(), even the library for html tables works as in the sample that i've tested

Cheers Marko and hope this may be helpful Smile
#3

[eluser]Unknown[/eluser]
[quote author="Carlos G" date="1338657217"]Hi Marko,

I have tested your function with the last version of my driver and works good, here is the way i've tested it:

Code:
$q = $this->getAll();
$this->load->library('table');
echo $this->table->generate($q);

please download the last versión of the driver from the github repository and you could checkit...

if you are doing a var_dump of the query object not all the properties of the object are showed completely, but you still can use the result functions like result_array() or result_object(), even the library for html tables works as in the sample that i've tested

Cheers Marko and hope this may be helpful Smile[/quote]

Thank you very much good sir! It was very helpful! Cheers! Smile
#4

[eluser]kichik[/eluser]
Your driver does not work with session on CI 2.1.0. User_data field everytime after refresh page cleared. Sorry for my bad english.




Theme © iAndrew 2016 - Forum software by © MyBB