Android SQL problem
I have this sql statement
SELECT *
FROM RecipeInstructions
ORDER BY INSTRUCTION_NUMBER ASC
WHERE RECIPE_ID_FK=1
execute it usin开发者_如何转开发g rawquery - have exception... Syntax error near WHERE... Why?
WHERE needs to come before ORDER BY
SELECT * FROM RecipeInstructions
WHERE RECIPE_ID_FK=1
ORDER BY INSTRUCTION_NUMBER ASC
Just a guess, but shouldn't the WHERE be before the ORDER BY?
You should try this instead:
SELECT * FROM RecipeInstructions WHERE RECIPE_ID_FK=1 ORDER BY INSTRUCTION_NUMBER ASC
精彩评论