Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 05-27 16:57:14.620 8858-8886/com.mc E/SQLiteLog﹕ (1) near "count": syntax error
- 05-27 16:57:14.624 8858-8886/com.mc E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #2
- Process: com.mc, PID: 8858
- java.lang.RuntimeException: An error occured while executing doInBackground()
- at android.os.AsyncTask$3.done(AsyncTask.java:300)
- at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
- at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
- at java.util.concurrent.FutureTask.run(FutureTask.java:242)
- at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
- at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
- at java.lang.Thread.run(Thread.java:818)
- Caused by: android.database.sqlite.SQLiteException: near "count": syntax error (code 1): , while compiling: SELECT w.id AS _id , w.*, '' AS h_title, (SELECT GROUP_CONCAT(type || ';' || CASE WHEN type = 'videos' THEN thumb WHEN (float_date_updated <= date_updated_local OR file IS NULL) AND file_local IS NOT NULL AND length(file_local) > 0 THEN file_local ELSE file END, ',') FROM (SELECT gm.* FROM gallery_media_updated_first AS gm WHERE gm.root = 'whiteboards' AND gm.type IN ('images', 'videos') AND gm.gallery_id = w.id LIMIT 3) AS wm GROUP BY wm.gallery_id LIMIT 1) AS files, p.last_name || ', ' || p.first_name AS patient_name FROM galleries w LEFT JOIN patients p ON w.patient = p.id INNER JOIN (SELECT gallery_id AS g_id FROM gallery_media WHERE type = 'images' AND root = 'whiteboards' AND deleted_local <> 1 AND deleted_remote <> 1 GROUP BY gallery_idHAVING count(id) > 0 ) AS fgm ON fgm.g_id = w.id WHERE w.user_id = ? AND w.deleted_local <> 1 AND w.deleted_remote <> 1 AND w.root = ? GROUP BY w.id ORDER BY MAX(COALESCE((SELECT MAX(COALESCE(gm.date_updated_local, gm.float_date_updated)) FROM gallery_media gm WHERE gm.gallery_id = w.id), 0), MAX(COALESCE(w.date_updated_local, 0), COALESCE(w.float_date_updated, 0))) DESC
- at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
- at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)
- at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500)
- at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
- at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
- at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
- at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
- at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1316)
- at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1163)
- at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1034)
- at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1202)
- at com.mc.data.database.dataproviders.GalleriesDataProvider.getGalleriesListCursor(GalleriesDataProvider.java:159)
- at com.mc.data.database.dataproviders.GalleriesDataProvider.getGalleriesListCursor(GalleriesDataProvider.java:94)
- at com.mc.galleries.core.SelectGalleryMediaFileStep1Activity.getGalleriesListCursor(SelectGalleryMediaFileStep1Activity.java:54)
- at com.mc.galleries.core.AbsSelectGalleryActivity$GalleriesPagerAdapter$1.getGalleriesListCursor(AbsSelectGalleryActivity.java:121)
- at com.mc.galleries.core.AbstractGalleriesListFragment$GalleriesListLoader.doInBackground(AbstractGalleriesListFragment.java:618)
- at com.mc.galleries.core.AbstractGalleriesListFragment$GalleriesListLoader.doInBackground(AbstractGalleriesListFragment.java:551)
- at android.os.AsyncTask$2.call(AsyncTask.java:288)
- at java.util.concurrent.FutureTask.run(FutureTask.java:237)
- at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
- at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
- at java.lang.Thread.run(Thread.java:818)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement