Skip to content

Instantly share code, notes, and snippets.

View cboden's full-sized avatar
📉
Munging data

Chris Boden cboden

📉
Munging data
View GitHub Profile
@cboden
cboden / gist:2044871
Created March 15, 2012 15:43
Truncate Foreign Key'd Tables
SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE `table1`;
TRUNCATE TABLE `table2`;
SET FOREIGN_KEY_CHECKS = 1;
@cboden
cboden / gist:1775473
Created February 8, 2012 23:39
Strange Failing Travis CI Test
<?php
/**
* The method that is being tested
*/
public function generateKeyNumber($key) {
// If there are no spaces, reject
if (0 === substr_count($key, ' ')) {
return '';
}