Snippets Collections
$this->load->library("form_validation");
$this->form_validation->set_rules("username", "User name", "trim|required");
if($this->form_validation->run() === FALSE)
{
     //$this->view_data["errors"] = validation_errors();
}
else
{
     //codes to run on success validation here
}
$sql = "SELECT * FROM some_table WHERE id = ? AND status = ? AND author = ?";
$this->db->query($sql, array(3, 'live', 'Rick')); // insert in ci
star

Thu Feb 24 2022 13:43:32 GMT+0000 (UTC)

#php #codeigniter #database #model
star

Thu Feb 24 2022 09:08:59 GMT+0000 (UTC)

#php #codeigniter #database #model
star

Thu Feb 24 2022 08:48:16 GMT+0000 (UTC) https://codeigniter.com/userguide3/database/query_builder.html

#php #codeigniter #database #model

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension