本文整理汇总了PHP中G::DieLoger方法的典型用法代码示例。如果您正苦于以下问题:PHP G::DieLoger方法的具体用法?PHP G::DieLoger怎么用?PHP G::DieLoger使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类G
的用法示例。
在下文中一共展示了G::DieLoger方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetOrderData_m_diler
public function GetOrderData_m_diler($id_order)
{
$and['o.id_order'] = $id_order;
$sql = "SELECT o.id_order, o.note2, o.note, o.target_date\r\n\t\t\tFROM " . _DB_PREFIX_ . "order o\r\n\t\t\t" . $this->db->GetWhere($and) . "\r\n\t\t\tGROUP BY o.id_order";
$arr = $this->db->GetArray($sql) or G::DieLoger("SQL - error: {$sql}");
return $arr;
}
示例2: DeletePromoCode
public function DeletePromoCode($id)
{
$promo_code_data = $this->GetPromoCodeById($id);
$f['promo_code'] = 'NULL';
$this->db->StartTrans();
if (!$this->db->Update(_DB_PREFIX_ . 'user', $f, "promo_code = '" . $promo_code_data['code'] . "'")) {
$this->db->FailTrans();
return false;
}
$sql = "DELETE FROM " . _DB_PREFIX_ . "promo_code WHERE id = {$id}";
$this->db->Query($sql) or G::DieLoger("<b>SQL Error - </b>{$sql}");
$this->db->CompleteTrans();
return true;
}
示例3: UpdatePhoto
/**
* Добавление и удаление фото
* @param integer $id_news id новости
* @param array $images_arr массив фотографий
*/
public function UpdatePhoto($id_news, $images_arr = array())
{
$sql = "DELETE FROM " . _DB_PREFIX_ . "image_news WHERE id_news = " . $id_news;
$this->db->StartTrans();
$this->db->Query($sql) or G::DieLoger("<b>SQL Error - </b>{$sql}");
$this->db->CompleteTrans();
$f['id_news'] = $id_news;
if (isset($images_arr) && !empty($images_arr)) {
$images = new Images();
$path = $GLOBALS['PATH_news_img'] . $id_news . '/';
$images->checkStructure($path);
foreach ($images_arr as $src) {
if (strpos($src, '\\temp/')) {
$new_path = '/' . str_replace('\\temp/', '/' . $id_news . '/', $src);
rename($GLOBALS['PATH_global_root'] . $src, $GLOBALS['PATH_global_root'] . $new_path);
$src = $new_path;
}
$f['src'] = $src;
$this->db->StartTrans();
if (!$this->db->Insert(_DB_PREFIX_ . 'image_news', $f)) {
$this->db->FailTrans();
return false;
}
$this->db->CompleteTrans();
}
}
unset($id_news, $sql, $new_path, $f);
return true;
}
示例4: ClearDB
public function ClearDB($date)
{
list($d, $m, $y) = explode(".", trim($date));
$date = mktime(0, 0, 0, $m, $d, $y);
$sql = "SELECT id_order\r\n\t\t\tFROM " . _DB_PREFIX_ . "order\r\n\t\t\tWHERE creation_date < '" . $date . "'";
$arr = $this->db->GetArray($sql);
if (count($arr)) {
$a = array();
foreach ($arr as $id) {
$a[] = $id['id_order'];
}
$ids = implode(",", $a);
$this->db->StartTrans();
$sql = "DELETE FROM " . _DB_PREFIX_ . "order WHERE id_order IN({$ids})";
if (!$this->db->Query($sql)) {
$this->db->FailTrans();
G::DieLoger("SQL error - {$sql}");
return false;
}
$sql = "DELETE FROM " . _DB_PREFIX_ . "osp WHERE id_order IN({$ids})";
if (!$this->db->Query($sql)) {
$this->db->FailTrans();
G::DieLoger("SQL error - {$sql}");
return false;
}
$sql = "DELETE FROM " . _DB_PREFIX_ . "pretense WHERE id_order IN({$ids})";
if (!$this->db->Query($sql)) {
$this->db->FailTrans();
G::DieLoger("SQL error - {$sql}");
return false;
}
$this->db->CompleteTrans();
}
return true;
}
示例5: updateActiveAssort
public function updateActiveAssort($id_assort, $active)
{
$product_limit = $active == 1 ? 10000000 : 0;
$sql = "UPDATE " . _DB_PREFIX_ . "assortiment SET product_limit = " . $product_limit . "\n\t\t\t\tWHERE id_assortiment = " . $id_assort;
$this->db->StartTrans();
$this->db->Query($sql) or G::DieLoger("<b>SQL Error - </b>{$sql}");
$this->db->CompleteTrans();
return true;
}
示例6: Insert
/**
* Мастер вставки
* @param string $table
* @param array $fields
* @return bool
*/
public function Insert($table, $fields)
{
$keys = array_keys($fields);
$values = array_values($fields);
$sql = "INSERT INTO {$table} (`";
$sql .= implode("`, `", $keys);
$sql .= "`) VALUES (";
foreach ($values as $key => $value) {
if (gettype($value) == 'string') {
$sql .= $this->Quote($value);
} else {
$sql .= "'" . $value . "'";
}
if ($key < count($values) - 1) {
$sql .= ', ';
}
}
$sql .= ")";
// if(G::IsLogged() && $_SESSION['member']['id_user'] == 25143){
// print_r($sql);
// }
return $this->Query($sql) or G::DieLoger("SQL error - {$sql}");
}
示例7: Reorder
}
// Сортировка
public function Reorder($arr)
{
foreach ($arr['ord'] as $_id => $ord) {
$sql = "UPDATE " . _DB_PREFIX_ . "manufacturers SET `ord` = {$ord}\r\t\t\t\tWHERE manufacturer_id = {$_id}";
$this->db->Query($sql) or G::DieLoger("<b>SQL Error - </b>{$sql}");
示例8: Reorder
public function Reorder($arr)
{
foreach ($arr['ord'] as $id => $ord) {
$sql = "UPDATE " . _DB_PREFIX_ . "parking\n\t\t\t\tSET ord = " . $ord . "\n\t\t\t\tWHERE id_parking = " . $id;
$this->db->Query($sql) or G::DieLoger("<b>SQL Error - </b>{$sql}");
}
}
示例9: DeleteSlide
public function DeleteSlide($id)
{
$sql = "DELETE\n\t\t\tFROM " . _DB_PREFIX_ . "slides\n\t\t\tWHERE id = " . $id;
$this->db->StartTrans();
$this->db->Query($sql) or G::DieLoger("<b>SQL Error - </b>{$sql}");
$this->db->CompleteTrans();
return true;
}
示例10: DeleteWishes
public function DeleteWishes($id_wishes)
{
$sql = "DELETE FROM " . _DB_PREFIX_ . "wishes WHERE id_wishes = " . $id_wishes;
$this->db->Query($sql) or G::DieLoger("<b>SQL Error - </b>{$sql}");
return true;
}
示例11: Reorder
public function Reorder($arr)
{
foreach ($arr['ord'] as $id_config => $ord) {
$sql = "UPDATE " . _DB_PREFIX_ . "config SET `ord` = {$ord}\r\n\t\t\t\t\tWHERE id_config = {$id_config}";
$this->db->Query($sql) or G::DieLoger("<b>SQL Error - </b>{$sql}");
}
}
示例12: Del
public function Del($id)
{
$sql = "DELETE FROM " . _DB_PREFIX_ . "segmentation WHERE `id` = {$id}";
$this->db->Query($sql) or G::DieLoger("<b>SQL Error - </b>{$sql}");
return true;
}
示例13: DelCustomer
public function DelCustomer($id)
{
$sql = "DELETE FROM " . _DB_PREFIX_ . "customer WHERE `id_user` = {$id}";
$this->db->Query($sql) or G::DieLoger("<b>SQL Error - </b>{$sql}");
$sql = "DELETE FROM " . _DB_PREFIX_ . "user WHERE id_user={$id}";
$this->db->Query($sql) or G::DieLoger("<b>SQL Error - </b>{$sql}");
return true;
}
示例14: DelRemitter
public function DelRemitter($id)
{
$sql = "DELETE FROM " . _DB_PREFIX_ . "remitter WHERE id={$id}";
$this->db->Query($sql) or G::DieLoger("<b>SQL Error - </b>{$sql}");
return true;
}
示例15: de1SeotextFormats
public function de1SeotextFormats($id)
{
$sql = 'DELETE FROM ' . _DB_PREFIX_ . 'seotext_formats WHERE id = ' . $id;
$this->db->Query($sql) or G::DieLoger("<b>SQL Error - </b>{$sql}");
return true;
}