0
我正在使用内容提供程序在sqlite中存储数据,并使用游标适配器在我的列表视图中显示数据。 我有3个表使用SQLiteQueryBuilder进行多个连接
1)Leads- [_id,姓名,....]
2)LeadsAttachment- [_id,格式,LeadId,...](LeadId是FK到_id PK的信息表)
3)LeadsProduct- [_id,PNAME,LeadId,...](LeadId是FK到_id信息表中的PK)
uptill现在我正在执行左引线和LeadsAttachment之间加入使用像这样的SQLQueryBuilder
SQLiteQueryBuilder leadsWithAttachmentQueryBuilder = new SQLiteQueryBuilder();
leadsWithAttachmentQueryBuilder.setTables(
MBenzContracts.LeadsEntry.TABLE_NAME + " LEFT JOIN " +
MBenzContracts.LeadAttachmentEntry.TABLE_NAME +
" ON " + MBenzContracts.LeadAttachmentEntry.TABLE_NAME +
"." + MBenzContracts.LeadAttachmentEntry.COLUMN_Lead_ID +
" = " + MBenzContracts.LeadsEntry.TABLE_NAME +
"." + MBenzContracts.LeadsEntry._ID);
我将如何执行2左联接在一起SQLiteQueryBuilder让我得到 全部来自信息记录与LeadsAttachment和LeadsProduct
沿