<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ## 非復雜語句可使用抽象層 類似于thinkphp的連貫查詢 #### 如果需要更復雜的數據庫模型支持可以自行開發sqlite-vue.js、mysql-vue.js 通用操作方法如下 #### 模型連貫操作 **M() 指定數據庫名** **where() 指定條件** **field() 字段過濾** **limit() 取數據數量** **order() 字段排序** #### 執行語句 **select() 查詢數據集** **delete() 刪除數據** **update() 更新數據** **insert() 添加數據** **find() 單條數據** **count() 取條數** **querySql() 執行原生sql** ### 根據條件查詢 數據數量 ``` let where = 'age = 20';//條件查詢 年齡在20歲的數據 M('members').where(where).count().then(e => { this.total = parseInt(e[0][0]); //獲取數據數量 }); ``` ### 查詢20條數據集 并以添加時間排序 ``` M('members').order('addtime desc').limit(20).select().then(e => { this.$notify({ title: '成功', message: '成功加載數據庫數據', type: 'success', duration: 3000 }) ``` ### 查詢 指定條件數據集排序后 并參與分頁 下面是抽取某時間段數據 ``` let startTime=null; let stopTime=null; if(this.value7 !== null){ startTime = (this.value7[0].getTime()/1000).toString(); stopTime = (this.value7[1].getTime()/1000).toString(); startTime = '"'+startTime+'"'; stopTime = '"'+stopTime+'"'; } let where = ''; if(startTime !== null && stopTime !== null){ where = 'regdate >=' + startTime + ' and regdate <=' + stopTime } let listNum = 10; let num1 = (page - 1) * listNum; let num2 = listNum; listNum = num1.toString() + ',' + num2.toString(); M('members').where(where).order('regdate desc').limit(listNum).select().then(e => { this.$notify({ title: '成功', message: '成功加載數據庫數據', type: 'success', duration: 3000 }) ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看