Welcome Guest, Not a member yet? Register   Sign In
I added new function in DB_result.php

I added this function in DB_result.php

function result_with_table_name() {
       $result = $this->result_id;
        while ($i < mysql_num_fields($result)) {          
            $fields[]=mysql_fetch_field($result, $i);
        while ($row=mysql_fetch_row($result)) {              
            for($i=0;$i<count($row); $i++) {
        return $return;

This function returns an array joining the table name and field name. This is very useful when we need to use "SQL JOIN" and some fields has the same name. Does codeigniter have already a similar function?

Theme © iAndrew 2016 - Forum software by © MyBB