Missing commas before sub_id in sql queries

Change-Id: I74abc23535f6a008c91b15343e9558711a515c44
Merge branch 'CyanogenMod/cm-11.0'