Created
December 1, 2011 13:54
-
-
Save douggrubba/1416883 to your computer and use it in GitHub Desktop.
hrm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//add support for the display id | |
$display_id = sprintf('(SELECT COALESCE(display_id, 0) + 1 FROM (SELECT MAX(display_id) AS display_id FROM '.DBPRE.'records WHERE project_id = %d) AS x)', $data['project_id']); | |
$this->db->set('display_id', $display_id, FALSE); | |
$this->db->insert(DBPRE . 'records', $data); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment