我试图使用带有左连接属性的select语句从sqlite数据库中的多个表中检索数据。
它检索null或undefined我和sqlite管理员一起使用了这个语句,它检索数据 你可以查看我的代码:
var db = Ti.Database.install('Path/DB_Name.s3db', 'DB_Name');
var rows = db.execute(
'select c.CustomerID,c.Name, c.CustomerCode,v.ConfirmationDate from Customer as c' +
' left join Visits as v on c.CustomerID==v.CustomerID ' +
' order by v.ConfirmationDate desc');
答案 0 :(得分:0)
试试这样:
var db = Ti.Database.install('Path/DB_Name.s3db', 'DB_Name');
var rows = db.execute(
'select c.CustomerID,c.Name, c.CustomerCode,v.ConfirmationDate from Customer as c' +
' left join Visits as v on c.CustomerID=v.CustomerID ' +
' order by v.ConfirmationDate desc');
单身" ="