本文整理汇总了PHP中SQL::doThat方法的典型用法代码示例。如果您正苦于以下问题:PHP SQL::doThat方法的具体用法?PHP SQL::doThat怎么用?PHP SQL::doThat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SQL
的用法示例。
在下文中一共展示了SQL::doThat方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteKategorien
/**
* Delete a Categorie in DB
* parameters = POST: Categorie ID
*/
public function deleteKategorien()
{
require 'classes/SQL.php';
$sql = new SQL();
$sql->connect();
$id = mysql_real_escape_string($_POST['id']);
if (is_numeric($id)) {
$sql->doThat('DELETE FROM quizCategories WHERE id=' . $id);
}
}
示例2: deleteQuestion
/**
* Remove Question in DB
* parameters = POST: QuestionID
*/
public function deleteQuestion()
{
require 'classes/SQL.php';
$sql = new SQL();
$sql->connect();
$id = mysql_real_escape_string($_POST['id']);
if (is_numeric($gameID)) {
$sql->doThat('DELETE FROM quizQuestions WHERE id=' . mysql_real_escape_string($id));
}
}
示例3: deleteCol
/**
* Delete Highscore Row in DB
* @return boolean
*/
public function deleteCol()
{
$success = false;
require_once 'classes/SQL.php';
$sql = new SQL();
$sql->connect();
$gameID = mysql_real_escape_string($_POST['id']);
if (person::getPermissionName() == 'admin' && is_numeric($gameID)) {
$sql->doThat("DELETE FROM quizGames WHERE id=" . $gameID);
}
return $success;
}
示例4: EndGame
/**
* Sets The End-Date in DB-Row Game
*/
public function EndGame()
{
$query = "UPDATE quizGames SET stop=now() WHERE id=" . $_SESSION['gameID'];
require_once 'classes/SQL.php';
$sql = new SQL();
$sql->connect();
$sql->doThat($query);
}