Skip to content

Instantly share code, notes, and snippets.

View mikemill's full-sized avatar

Michael Miller mikemill

  • Visions In Education
  • Carmichael CA
View GitHub Profile
@mikemill
mikemill / fk_table_check.sql
Created July 18, 2018 15:18
MySQL Foreign Key references
SELECT
TABLE_NAME,
COLUMN_NAME,
CONSTRAINT_NAME,
REFERENCED_TABLE_NAME,
REFERENCED_COLUMN_NAME,
UPDATE_RULE,
DELETE_RULE
FROM
INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS kcu
<?php
foreach ($log as $i => $log_item) {
echo $log_item['AuditEntryMessage'];
echo '(', $log_item['Username'], ')';
echo $log_item['AuditEntryMessage'];
if ($i < count($log) - 1) {
echo "\r\n";
}
}
@mikemill
mikemill / gist:2927915
Created June 14, 2012 03:55
Initial attempt at testing the user class. Still need to test user settings
<?php
namespace JawHare;
class UserTest extends \PHPUnit_Framework_TestCase
{
protected $user;
protected $user_data = array(
'username' => 'PHPUnitTest',
'fullname' => 'PHP Unit Testing',