Android - SQLiteException:靠近“=”:语法错误(代码 1)

Android - SQLiteException: near "=": syntax error (code 1)

我正在尝试使用用户 ID

记录来自用户 table 的 ID 和来自作业 table 的作业名称
String select = "SELECT jobname FROM " + TABLE_JOBS+ "where userid =" +myid;
"SELECT jobname FROM " + TABLE_JOBS+ "where userid =" +myid;

您的 table 姓名等标识符和 where:

等关键字之间需要空格
"SELECT jobname FROM " + TABLE_JOBS+ " where userid =" +myid;

您在 where 子句之前缺少一个空格,因此它直接附加到 table 名称,并且您实际上没有 where 子句:

String select = "SELECT jobname FROM " + TABLE_JOBS+ " where userid =" +myid;
// whitespace was missing here -----------------------^