public function __construct($condition = []) { $this->db = Application::$i->dbConnection; $this->__tableName = static::tableName(); if (!empty($condition)) { $this->__DataSet = $this->select($condition)->get(); var_dump_pre($this->__DataSet); } }
/** * Delete an existing secret * @param $secret The secret name */ function secrets_delete($secret) { if (isset($secret['name'])) { $esc_name = mysql_real_escape_string($secret['name']); $sql = "DELETE FROM variable WHERE name = '" . $esc_name . "'"; $res = mysql_query($sql); if (!$res) { die(mysql_error()); } if (mysql_affected_rows() > 0) { message_register('Secret deleted.'); } } else { message_register('No such secret'); var_dump_pre($secret); } }
<?php var_dump_pre($_SESSION); function var_dump_pre($mixed = null) { echo '<pre>'; print_r($mixed); echo '</pre>'; return null; }