Skip to content

Instantly share code, notes, and snippets.

View Moketronics's full-sized avatar

Michael Ramsey Moketronics

View GitHub Profile
@Moketronics
Moketronics / gist:1894253
Created February 23, 2012 18:34
Tile store initial DB layout revised
CREATE TABLE tiles (
tile_id INT(6) UNSIGNED NOT NULL AUTO_INCREMENT,
tile_name TEXT NOT NULL,
quantity INT(6) UNSIGNED NOT NULL,
old_lot_qty INT(6) UNSIGNED,
nom_height DECIMAL(6,3) UNSIGNED NOT NULL,
nom_width DECIMAL(6,3) UNSIGNED NOT NULL,
nom_thick DECIMAL(6,3) UNSIGNED NOT NULL,
exact_height INT(6) UNSIGNED,
exact_width INT(6) UNSIGNED,
@Moketronics
Moketronics / gist:1892706
Created February 23, 2012 12:59
Tile Store Inventory System in progress db
CREATE TABLE tiles (
tile_id INT(6) UNSIGNED NOT NULL AUTO_INCREMENT,
tile_name VARCHAR(80) NOT NULL,
quantity SMALLINT(5) UNSIGNED NOT NULL,
old_lot_qty SMALLINT(5) UNSIGNED,
n_height FLOAT(3) UNSIGNED NOT NULL,
n_width FLOAT(3) UNSIGNED NOT NULL,
n_thick FLOAT(3) UNSIGNED NOT NULL,
e_height SMALLINT(5) UNSIGNED,
e_width SMALLINT(5) UNSIGNED,
@Moketronics
Moketronics / gist:1887091
Created February 22, 2012 20:36
Tile store initial DB layout
CREATE TABLE tiles (
tile_id SMALLINT(5) UNSIGNED NOT NULL AUTO_INCREMENT,
tile_name VARCHAR(80) NOT NULL,
quantity SMALLINT(5) UNSIGNED NOT NULL,
old_lot_qty SMALLINT(5) UNSIGNED,
n_height FLOAT(3) UNSIGNED NOT NULL,
n_width FLOAT(3) UNSIGNED NOT NULL,
n_thick FLOAT(3) UNSIGNED NOT NULL,
e_height FLOAT(5) UNSIGNED,
e_height FLOAT(5) UNSIGNED,
@Moketronics
Moketronics / field-clear-php-fix.php
Created February 8, 2012 21:10
JS field clearing issue PHP side fix
if (stripos($_POST['first_name'], 'first name...') !== false) {
$first_name = str_ireplace('first name...', '', $_POST['first_name']);
$first_name = sanitize_user( $first_name, true );
} else {
$first_name = sanitize_user( $_POST['first_name'], true );
}
if (stripos($_POST['last_name'], 'last name...') !== false) {
$last_name = str_ireplace('last name...', '', $_POST['last_name']);
$last_name = sanitize_user( $last_name );