public static function addQuery($adapter, $query, $data = null)
{
// Shift element off beginning of array if we're at the query limit
if (self::queryCount() >= self::queryLimit()) {
array_shift(self::$_queries);
}
self::$_queries[] = array('adapter' => get_class($adapter), 'query' => $query, 'data' => $data);
self::$_queryCount++;
}
/** * Drop a database table * Destructive and dangerous - drops entire table and all data * Will throw errors if user does not have proper permissions */ public function dropDatabase($database) { $sql = "DROP DATABASE " . $database; // Add query to log \Spot\Log::addQuery($this, $sql); return $this->connection()->exec($sql); }