ppypp伦理天堂,91手机在线视频,免费在线观看黄色毛片,夜夜穞天天穞狠狠穞AV美女按摩

聯系官方銷售客服

1835022288

028-61286886

投訴 已解決 昨天那個問題報錯了想通過獲取另外一個數據庫指定分類的數據還的 11 0
迅睿CMS版本:4.5.0 #數據庫
解決方案
  • 報什么錯呢?把上面的代碼復制出來,不要截圖代碼,不方便修改代碼

  • 回復@官方研發實習技術

    mysqli_sql_exception #1054

    Unknown column 'id' in 'order clause' 搜索問題 →

    SELECT * FROM `mac_vod` ORDER BY `id` desc LIMIT 10

    SYSTEMPATH/Database/MySQLi/Connection.php at line 331

    324             if ($res = $this->connID->store_result())325             {326                 $res->free();327             }328         }329         try330         {331             return $this->connID->query($this->prepQuery($sql));332         }333         catch (\mysqli_sql_exception $e)334         {335             log_message('error', $e);336             if ($this->DBDebug)337             {338                 throw $e;
    1. SYSTEMPATH/Database/MySQLi/Connection.php : 331 — mysqli->query ( arguments )

      324             if ($res = $this->connID->store_result())325             {326                 $res->free();327             }328         }329         try330         {331             return $this->connID->query($this->prepQuery($sql));332         }333         catch (\mysqli_sql_exception $e)334         {335             log_message('error', $e);336             if ($this->DBDebug)337             {338                 throw $e;
    2. SYSTEMPATH/Database/BaseConnection.php : 741 — CodeIgniter\Database\MySQLi\Connection->execute ( arguments )

      734     public function simpleQuery(string $sql)735     {736         if (empty($this->connID))737         {738             $this->initialize();739         }740 741         return $this->execute($sql);742     }743 744     //--------------------------------------------------------------------745 746     /**747      * Disable Transactions748      *
    3. SYSTEMPATH/Database/BaseConnection.php : 669 — CodeIgniter\Database\BaseConnection->simpleQuery ( arguments )

      662         $startTime = microtime(true);663 664         // Always save the last query so we can use665         // the getLastQuery() method.666         $this->lastQuery = $query;667 668         // Run the query for real669         if (! $this->pretend && false === ($this->resultID = $this->simpleQuery($query->getQuery())))670         {671             $query->setDuration($startTime, $startTime);672 673             // This will trigger a rollback if transactions are being used674             if ($this->transDepth !== 0)675             {676                 $this->transStatus = false;
    4. SYSTEMPATH/Database/BaseBuilder.php : 1860 — CodeIgniter\Database\BaseConnection->query ( arguments )

      1853         if (! is_null($limit))1854         {1855             $this->limit($limit, $offset);1856         }1857 1858         $result = $this->testMode1859             ? $this->getCompiledSelect($reset)1860             : $this->db->query($this->compileSelect(), $this->binds, false);1861 1862         if ($reset === true)1863         {1864             $this->resetSelect();1865 1866             // Clear our binds so we don't eat up memory1867             $this->binds = [];
    5. FCPATH/Fcms/Core/Model.php : 787 — CodeIgniter\Database\BaseBuilder->get ()

      780             }781         }782 783         $param = $this->_limit_page_where($select, $param);784         if ($size > 0) {785             $select->limit($size, $size * ($page - 1));786         }787         $query = $select->orderBy($order_str ? $order_str : 'id desc')->get();788         if (!$query) {789             log_message('error', '數據查詢失敗:'.$this->table);790             $this->_clear();791             return [[], $total, $param];792         }793         $data = $query->getResultArray();794
    6. APPPATH/Api/diy.php : 20 — Phpcmf\Model->limit_page ( arguments )

      13 $return = []; // 返回數據14 15 $db2 = \Config\Database::connect('mac', false);16 17 // 通過db2查詢 cms2的member表數據18 19 \Phpcmf\Service::M()->db = $db2;20 list($data) = \Phpcmf\Service::M()->table('vod')->limit_page(10);21 22 if ($data) {23 24     foreach ($data as $r) {25 26         $return[] = [27
    7. require APPPATH/Models/Http.php — require()

    8. APPPATH/Controllers/Admin/Http.php : 93 — Phpcmf\Model\Httpapi\Http->get_api_data ( arguments )

       86             exit(dr_lang('接口數據不存在')); 87         } 88         $content = dr_string2array($data['content']); 89         if (!$content) { 90             exit(dr_lang('接口數據定義內容不存在')); 91         } 92  93         $rt = \Phpcmf\Service::M('http', APP_DIR)->get_api_data($content); 94         echo SITE_URL.'index.php?s=httpapi&id='.$id.'&appid=需要填寫值&appsecret=需要填寫值'; 95         echo '<hr>'; 96         echo '<pre>'; 97         print_r($rt); 98         exit; 99     }100
    9. SYSTEMPATH/CodeIgniter.php : 918 — Phpcmf\Controllers\Admin\Http->test_index ()

      911 912         if (method_exists($class, '_remap'))913         {914             $output = $class->_remap($this->method, ...$params);915         }916         else917         {918             $output = $class->{$this->method}(...$params);919         }920 921         $this->benchmark->stop('controller');922 923         return $output;924     }925
    10. SYSTEMPATH/CodeIgniter.php : 404 — CodeIgniter\CodeIgniter->runController ( arguments )

      397         if (! is_callable($this->controller))398         {399             $controller = $this->createController();400 401             // Is there a "post_controller_constructor" event?402             Events::trigger('post_controller_constructor');403 404             $returned = $this->runController($controller);405         }406         else407         {408             $this->benchmark->stop('controller_constructor');409             $this->benchmark->stop('controller');410         }411
    11. SYSTEMPATH/CodeIgniter.php : 312 — CodeIgniter\CodeIgniter->handleRequest ( arguments )

      305 306             $this->response->pretend($this->useSafeOutput)->send();307             $this->callExit(EXIT_SUCCESS);308         }309 310         try311         {312             return $this->handleRequest($routes, $cacheConfig, $returnResponse);313         }314         catch (RedirectException $e)315         {316             $logger = Services::logger();317             $logger->info('REDIRECTED ROUTE at ' . $e->getMessage());318 319             // If the route is a 'redirect' route, it throws
    12. FCPATH/Fcms/Init.php : 378 — CodeIgniter\CodeIgniter->run ()

      371  * the application run, and does all of the dirty work to get372  * the pieces all working together.373  */374 375 376 $app = new \Phpcmf\Extend\CodeIgniter(config(\Config\App::class));377 $app->initialize();378 $app->run();
    13. require /www/wwwroot//index.php — require()

    14. require /www/wwwroot//admin.php — require()

    Displayed at 11:19:17am — PHP: 7.3.5 — CodeIgniter: 4.0.4

  • /index.php?s=httpapi&id=2&appid=需要填寫值&appsecret=需要填寫值&page=[翻頁數字]

    <?php
    
    /**
    
     * api 示例文件
    
     * 變量介紹javascript:;
    
     * $return 表示標準返回變量
    
     */
    
    $return = []; // 返回數據
    
    $db2 = \Config\Database::connect('mac', false);
    
    // 通過db2查詢 cms2的member表數據
    
    \Phpcmf\Service::M()->db = $db2;
    list($data) = \Phpcmf\Service::M()->table('vod')->limit_page(10);
    
    if ($data) {
    
        foreach ($data as $r) {
    
            $return[] = [
    
                'id' => $r['vod_id'],
    
                'username' => $r['vod_name'],
    
            ];
    
        }
    
    }

  • 昨天那個問題報錯了想通過獲取另外一個數據庫指定分類的數據還的

    這個代碼復制給我呢,需要改寫一下

  • <?php
    
    /**
    
     * api 示例文件
    
     * 變量介紹javascript:;
    
     * $return 表示標準返回變量
    
     */
    
    $return = []; // 返回數據
    
    $db2 = \Config\Database::connect('mac', false);
    
    // 通過db2查詢 cms2的member表數據
    
    \Phpcmf\Service::M()->db = $db2;
    $init = [
        'table' => 'vod',
        'order_by' => 'vod_id DESC',
    ];
    list($data) = \Phpcmf\Service::M()->init($init)->limit_page(10);
    
    if ($data) {
    
        foreach ($data as $r) {
    
            $return[] = [
    
                'id' => $r['vod_id'],
    
                'username' => $r['vod_name'],
    
            ];
    
        }
    
    }
    滿意答案
    開源積分+10
  • 有沒有相關文檔

  • 回復@官方研發實習技術 問題比較多 不想老麻煩你 嘿嘿 自己先看看文檔學學

  • 官方技術直接給你寫出來,比看文檔方便的多

  • @官方研發實習技術:沒毛病 完美