當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PMA_Bookmark_delete函數代碼示例

本文整理匯總了PHP中PMA_Bookmark_delete函數的典型用法代碼示例。如果您正苦於以下問題:PHP PMA_Bookmark_delete函數的具體用法?PHP PMA_Bookmark_delete怎麽用?PHP PMA_Bookmark_delete使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了PMA_Bookmark_delete函數的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: PMA_storeTheQueryAsBookmark

/**
 * Function to store the query as a bookmark
 *
 * @param String  $db                     the current database
 * @param String  $bkm_user               the bookmarking user
 * @param String  $sql_query_for_bookmark the query to be stored in bookmark
 * @param String  $bkm_label              bookmark label
 * @param boolean $bkm_replace            whether to replace existing bookmarks
 *
 * @return void
 */
function PMA_storeTheQueryAsBookmark($db, $bkm_user, $sql_query_for_bookmark, $bkm_label, $bkm_replace)
{
    include_once 'libraries/bookmark.lib.php';
    $bfields = array('bkm_database' => $db, 'bkm_user' => $bkm_user, 'bkm_sql_query' => urlencode($sql_query_for_bookmark), 'bkm_label' => $bkm_label);
    // Should we replace bookmark?
    if (isset($bkm_replace)) {
        $bookmarks = PMA_Bookmark_getList($db);
        foreach ($bookmarks as $key => $val) {
            if ($val == $bkm_label) {
                PMA_Bookmark_delete($key);
            }
        }
    }
    PMA_Bookmark_save($bfields, isset($_POST['bkm_all_users']));
}
開發者ID:harryboulderdash,項目名稱:PlayGFC,代碼行數:26,代碼來源:sql.lib.php

示例2: testDelete

 /**
  * Test for PMA_Bookmark_delete
  *
  * @return void
  */
 public function testDelete()
 {
     $this->assertFalse(PMA_Bookmark_delete('1'));
 }
開發者ID:itgsod-philip-skalander,項目名稱:phpmyadmin,代碼行數:9,代碼來源:PMA_bookmark_test.php

示例3: array

// end bookmarks reading
// Do no run query if we show PHP code
if (isset($GLOBALS['show_as_php'])) {
    $run_query = FALSE;
    $go_sql = TRUE;
}
// Store the query as a bookmark before executing it if bookmarklabel was given
if (!empty($bkm_label) && !empty($import_text)) {
    require_once './libraries/bookmark.lib.php';
    $bfields = array('dbase' => $db, 'user' => $cfg['Bookmark']['user'], 'query' => urlencode($import_text), 'label' => $bkm_label);
    // Should we replace bookmark?
    if (isset($bkm_replace)) {
        $bookmarks = PMA_Bookmark_getList($db);
        foreach ($bookmarks as $key => $val) {
            if ($val == $bkm_label) {
                PMA_Bookmark_delete($db, $key);
            }
        }
    }
    PMA_Bookmark_save($bfields, isset($bkm_all_users));
    $bookmark_created = TRUE;
}
// end store bookmarks
// We can not read all at once, otherwise we can run out of memory
$memory_limit = trim(@ini_get('memory_limit'));
// 2 MB as default
if (empty($memory_limit)) {
    $memory_limit = 2 * 1024 * 1024;
}
// In case no memory limit we work on 10MB chunks
if ($memory_limit == -1) {
開發者ID:davidmottet,項目名稱:automne,代碼行數:31,代碼來源:import.php

示例4: PMA_Bookmark_get

         if ($GLOBALS['is_ajax_request'] == true) {
             $message = PMA_Message::success(__('Showing bookmark'));
             $response = PMA_Response::getInstance();
             $response->isSuccess($message->isSuccess());
             $response->addJSON('message', $message);
             $response->addJSON('sql_query', $import_text);
             $response->addJSON('action_bookmark', $action_bookmark);
             exit;
         } else {
             $run_query = false;
         }
         break;
     case 2:
         // bookmarked query that have to be deleted
         $import_text = PMA_Bookmark_get($db, $id_bookmark);
         PMA_Bookmark_delete($id_bookmark);
         if ($GLOBALS['is_ajax_request'] == true) {
             $message = PMA_Message::success(__('The bookmark has been deleted.'));
             $response = PMA_Response::getInstance();
             $response->isSuccess($message->isSuccess());
             $response->addJSON('message', $message);
             $response->addJSON('action_bookmark', $action_bookmark);
             $response->addJSON('id_bookmark', $id_bookmark);
             exit;
         } else {
             $run_query = false;
             $error = true;
             // this is kind of hack to skip processing the query
         }
         break;
 }
開發者ID:katopenzz,項目名稱:openemr,代碼行數:31,代碼來源:import.php

示例5: testPMA_Bookmark_delete

 /**
  * Test for PMA_Bookmark_delete
  *
  * @return void
  */
 public function testPMA_Bookmark_delete()
 {
     $this->assertFalse(
         PMA_Bookmark_delete('phpmyadmin', '1')
     );
 }
開發者ID:roccivic,項目名稱:phpmyadmin,代碼行數:11,代碼來源:PMA_bookmark_test.php

示例6: testPMA_Bookmark_delete

 /**
  * Test for PMA_Bookmark_delete
  */
 public function testPMA_Bookmark_delete(){
     if (! function_exists('PMA_DBI_try_query')) {
         function PMA_DBI_try_query()
         {
             return false;
         }
     }
     $this->assertFalse(
         PMA_Bookmark_delete('phpmyadmin', '1')
     );
 }
開發者ID:rajatsinghal,項目名稱:phpmyadmin,代碼行數:14,代碼來源:PMA_bookmark_test.php


注:本文中的PMA_Bookmark_delete函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。