Last active
August 29, 2015 14:10
-
-
Save seanmcn/a11585c45d72f2df1faf to your computer and use it in GitHub Desktop.
Using Codeigniter's ActiveRecord
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
/* | |
* Model for Projects | |
*/ | |
function addProject($client, $projectName, $price, $deadline, $notes) { | |
$project = array( | |
"client_id" => $client, | |
"user_id" => $this->session->userdata('user_id'), | |
"name" => $projectName, | |
"price" => $price, | |
"deadline" => $deadline, | |
"notes" => $notes, | |
"active" => 1 | |
); | |
$this->db->insert('projects', $project); | |
return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment