• <small id='DUFAj'></small><noframes id='DUFAj'>

    <tfoot id='DUFAj'></tfoot>

      <i id='DUFAj'><tr id='DUFAj'><dt id='DUFAj'><q id='DUFAj'><span id='DUFAj'><b id='DUFAj'><form id='DUFAj'><ins id='DUFAj'></ins><ul id='DUFAj'></ul><sub id='DUFAj'></sub></form><legend id='DUFAj'></legend><bdo id='DUFAj'><pre id='DUFAj'><center id='DUFAj'></center></pre></bdo></b><th id='DUFAj'></th></span></q></dt></tr></i><div id='DUFAj'><tfoot id='DUFAj'></tfoot><dl id='DUFAj'><fieldset id='DUFAj'></fieldset></dl></div>
          <bdo id='DUFAj'></bdo><ul id='DUFAj'></ul>

      1. <legend id='DUFAj'><style id='DUFAj'><dir id='DUFAj'><q id='DUFAj'></q></dir></style></legend>
      2. SQLite Titanium 语法错误

        时间:2023-08-20
      3. <legend id='SD8Oc'><style id='SD8Oc'><dir id='SD8Oc'><q id='SD8Oc'></q></dir></style></legend>

        • <small id='SD8Oc'></small><noframes id='SD8Oc'>

            <tfoot id='SD8Oc'></tfoot>

                <tbody id='SD8Oc'></tbody>

                  <bdo id='SD8Oc'></bdo><ul id='SD8Oc'></ul>
                  <i id='SD8Oc'><tr id='SD8Oc'><dt id='SD8Oc'><q id='SD8Oc'><span id='SD8Oc'><b id='SD8Oc'><form id='SD8Oc'><ins id='SD8Oc'></ins><ul id='SD8Oc'></ul><sub id='SD8Oc'></sub></form><legend id='SD8Oc'></legend><bdo id='SD8Oc'><pre id='SD8Oc'><center id='SD8Oc'></center></pre></bdo></b><th id='SD8Oc'></th></span></q></dt></tr></i><div id='SD8Oc'><tfoot id='SD8Oc'></tfoot><dl id='SD8Oc'><fieldset id='SD8Oc'></fieldset></dl></div>
                  本文介绍了SQLite Titanium 语法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  以下 SQL 代码在 SQLite 管理器和其他 SQLite 系统中运行良好,但是当我在 Titanium 中使用它时,我得到一个Uncaught SyntaxError: Unexpected String".如果我的语法错误,应该如何为 Titanium 编码?

                  The following SQL code works fine in SQLite Manager and in other SQLite systems, however when I use it in Titanium I get an "Uncaught SyntaxError: Unexpected String." If my syntax is wrong, how should it be coded for Titanium?

                      SELECT Date, Content
                      FROM MYDATABASE
                      WHERE strftime('%m%d', Date) = strftime('%m%d', date('now')) 
                  

                  推荐答案

                  您是否将您的表称为 MYDATABASE?您是否正在逐步调试调试器并确认 var rs = db.execute("SELECT Date, Content FROM MYDATABASE WHERE strftime('%m%d', date) = strftime('%m%d', date('现在'))");

                  Did you call your table MYDATABASE? Are you stepping through the debugger and confirming that var rs = db.execute("SELECT Date, Content FROM MYDATABASE WHERE strftime('%m%d', date) = strftime('%m%d', date('now')) ");

                  在我的 Titanium Mobile 项目中,我首先定义了数据库:

                  In my Titanium Mobile project I first defined the database:

                  var db = Ti.Database.open('myDb');
                  db.execute('CREATE TABLE IF NOT EXISTS [MYDATABASE](id INTEGER PRIMARY KEY AUTOINCREMENT, Date DATE, Content TEXT)');
                  db.close();
                  

                  然后我从函数调用中执行了这段代码

                  I then executed this code from a function call

                  var db = Ti.Database.open('myDb');
                  var myresult = db.execute("INSERT INTO MYDATABASE(Date, Content) VALUES (date('now'), '12345')");
                  myresult = db.execute("SELECT Date, Content FROM MYDATABASE WHERE strftime('%m%d', Date) = strftime('%m%s', date('now')) ");
                  Ti.API.info('myresult: ' + myresult.fieldByName('Content'));
                  

                  此代码在调试窗口中成功返回 myresult: 12345.您可能需要向我们提供源代码的重要部分,以便我们可以看到代码的流程.给我们碎片是行不通的.

                  This code returns myresult: 12345 in the debug window successfully for me. You probably need to provide us with a significant part of the source code so we can see the flow of the code. Giving us pieces isn't working.

                  不幸的是,我不得不在另一台计算机上进行测试,希望在这里重新输入不会出错"

                  Unfortunately, I had to test this from another computer and hopefully didn't make any errors re-typing it here"

                  这篇关于SQLite Titanium 语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:我应该在客户端将 GraphQL ID 作为字符串处理吗? 下一篇:Titanium sqlite ORDER BY 语句

                  相关文章

                  最新文章

                • <small id='1EVq7'></small><noframes id='1EVq7'>

                  1. <legend id='1EVq7'><style id='1EVq7'><dir id='1EVq7'><q id='1EVq7'></q></dir></style></legend>

                      <tfoot id='1EVq7'></tfoot>
                      <i id='1EVq7'><tr id='1EVq7'><dt id='1EVq7'><q id='1EVq7'><span id='1EVq7'><b id='1EVq7'><form id='1EVq7'><ins id='1EVq7'></ins><ul id='1EVq7'></ul><sub id='1EVq7'></sub></form><legend id='1EVq7'></legend><bdo id='1EVq7'><pre id='1EVq7'><center id='1EVq7'></center></pre></bdo></b><th id='1EVq7'></th></span></q></dt></tr></i><div id='1EVq7'><tfoot id='1EVq7'></tfoot><dl id='1EVq7'><fieldset id='1EVq7'></fieldset></dl></div>
                        <bdo id='1EVq7'></bdo><ul id='1EVq7'></ul>