Ticket #145 (new Feature Request)

Opened 12 months ago

Last modified 9 months ago

Database Library does not support prepared statements

Reported by: zombor Owned by: zombor
Priority: minor Milestone: 2.2
Component: Libraries:Database Version: SVN HEAD
Keywords: database, prepared statements Cc:

Description

Database library should support prepared statements.

Attachments

mysqli.php (8.4 kB) - added by ae 11 months ago.
stored procedures example contained within

Change History

Changed 12 months ago by Shadowhand

  • owner set to zombor

Changed 12 months ago by Shadowhand

  • keywords database, prepared statements added; database removed

Changed 12 months ago by zombor

  • milestone changed from 2.0 to 2.1

Changed 11 months ago by ae

hiya - please see attached file for how we dealt with stored procedures. its based of a VERY early revision of kohana, so its very codeigniterish :)

note how it completely overrides the db object. we are supplying thyis more as a point of reference, rather than a replacement.

cheers

andrew (code done by gary)

Changed 11 months ago by ae

stored procedures example contained within

Changed 11 months ago by ae

heres an example of how the sp was called in code :

public function events_count($u_id) {

$this->K->db->call('events_count', $u_id);

# Check the return result of the procedure call if($this->K->db->error){

# generate an error parent::generate_error('events_count_'.$this->K->db->error); return False;

}else{

# check to see what the count is $e_data = $this->K->db->results; return $e_data[0]e_count?;

}

}

Changed 9 months ago by gregmac

  • component changed from Core to Libraries:Database

Changed 9 months ago by zombor

  • milestone changed from 2.1 to 2.2
Note: See TracTickets for help on using tickets.