本文整理汇总了PHP中MySQL::BuildSQLDelete方法的典型用法代码示例。如果您正苦于以下问题:PHP MySQL::BuildSQLDelete方法的具体用法?PHP MySQL::BuildSQLDelete怎么用?PHP MySQL::BuildSQLDelete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MySQL
的用法示例。
在下文中一共展示了MySQL::BuildSQLDelete方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: exp_delete_record
/**
* delete exp entry
*
* @param integer $usr_ID
* @param integer $id -> ID of record
* @global array $kga kimai-global-array
* @author th
*/
function exp_delete_record($id)
{
global $kga, $conn;
$filter["exp_ID"] = MySQL::SQLValue($id, MySQL::SQLVALUE_NUMBER);
$table = $kga['server_prefix'] . "exp";
$query = MySQL::BuildSQLDelete($table, $filter);
return $conn->Query($query);
}
示例2: expense_delete
/**
* delete expense entry
*
* @param integer $userID
* @param integer $id -> ID of record
* @global array $kga kimai-global-array
* @author th
*/
function expense_delete($id)
{
global $kga, $database;
$conn = $database->getConnectionHandler();
$filter["expenseID"] = MySQL::SQLValue($id, MySQL::SQLVALUE_NUMBER);
$table = $kga['server_prefix'] . "expenses";
$query = MySQL::BuildSQLDelete($table, $filter);
return $conn->Query($query);
}
示例3: membership_role_delete
/**
* @param $membershipRoleID
* @return bool
*/
public function membership_role_delete($membershipRoleID)
{
$table = $this->kga['server_prefix'] . "membershipRoles";
$filter['membershipRoleID'] = MySQL::SQLValue($membershipRoleID, MySQL::SQLVALUE_NUMBER);
$query = MySQL::BuildSQLDelete($table, $filter);
$result = $this->conn->Query($query);
if ($result == false) {
$this->logLastError('membership_role_delete');
return false;
}
return true;
}
示例4: var_dump
$db->Kill();
}
// --------------------------------------------------------------------------
// Want to know if you are connected? Use IsConnected()
echo "Are we connected? ";
var_dump($db->IsConnected());
echo "\n<br />\n";
// --------------------------------------------------------------------------
// Now we can generate SQL statements from arrays!
// Let's create an array for the examples
// $arrayVariable["column name"] = formatted SQL value
$values["Name"] = MySQL::SQLValue("Violet");
$values["Age"] = MySQL::SQLValue(777, MySQL::SQLVALUE_NUMBER);
// Echo out some SQL statements
echo "<pre>" . "\n";
echo MySQL::BuildSQLDelete("Test", $values) . "\n<br />\n";
echo MySQL::BuildSQLInsert("Test", $values) . "\n<br />\n";
echo MySQL::BuildSQLSelect("Test", $values) . "\n<br />\n";
echo MySQL::BuildSQLUpdate("Test", $values, $values) . "\n<br />\n";
echo MySQL::BuildSQLWhereClause($values) . "\n<br />\n";
echo "</pre>" . "\n";
// Or create more advanced SQL SELECT statements
$columns = array("Name", "Age");
$sort = "Name";
$limit = 10;
echo MySQL::BuildSQLSelect("Test", $values, $columns, $sort, true, $limit);
echo "\n<br />\n";
$columns = array("Color Name" => "Name", "Total Age" => "Age");
$sort = array("Age", "Name");
$limit = "10, 20";
echo MySQL::BuildSQLSelect("Test", $values, $columns, $sort, false, $limit);
示例5: clearTableData
function clearTableData($gpx_gr_id, $debug)
{
global $obj;
$obj->execute(MySQL::BuildSQLDelete('grp_page', array('gpx_gr_id' => $obj->getSqlColValue('gpx_gr_id', $gpx_gr_id))), $debug);
}
示例6: expense_delete
/**
* delete exp entry
*
* @param integer $id -> ID of record
* @return object
*/
public function expense_delete($id)
{
$filter["expenseID"] = MySQL::SQLValue($id, MySQL::SQLVALUE_NUMBER);
$table = $this->getExpenseTable();
$query = MySQL::BuildSQLDelete($table, $filter);
return $this->conn->Query($query);
}