Skip to content

Instantly share code, notes, and snippets.

View stoddsie's full-sized avatar

Jaggy Pixel Games stoddsie

  • Jaggy Pixel Games
View GitHub Profile
@stoddsie
stoddsie / document_ready.php
Last active December 15, 2015 22:59
Jquery:Document Ready
jQuery(document).ready(function() {
});
@stoddsie
stoddsie / form_submission.php
Last active December 15, 2015 22:59
Codeigniter:Check Form submission
if (!$this->input->post('submit') == 'submit') {
}
@stoddsie
stoddsie / gist:5336780
Last active December 15, 2015 22:59
Codeigniter:Retrieve single row from database
//Setup a database connection returning a single row value
$this->db->select("*");
$this->db->where("field", $value);
$query = $this->db->get("table",1,0);
if($query->num_rows() > 0) {
$variable = $query->row("field");
return $variable;
} else {
return FALSE;
@stoddsie
stoddsie / class_constructor.php
Last active December 15, 2015 22:59
Codeigniter:Class Constructor
function __construct()
{
parent::__construct();
}