Android Development Learning Experience 2--"first line Code" coolweather Project SQL statement the same "trap" dropped two times note that special characters such as escape characters are correctly written about ID field self-increase experience

Source: Internet
Author: User

Today, in running the first line of code Coolweather second stage code, another error, or magically similar to yesterday, hint, city_id field does not exist, here I have two kinds of understanding, one is the SQL statement error, the other is not get city_id value, about the former, I compared the "detailed" check, county Table statement, first ruled out, and then a brain put into how to solve the second problem, and finally, once again the tragic fact told me, as long as the hint "No such column" hint, Well, there's no doubt that there's no such field in the database. That is, the SQL statement builds the table there is a mistake.

SQL statement error is also quite wonderful, unexpectedly is to forget two comma, OK, novice slag slag to face the error, specific as follows:

After correction, the following:

After that, the program runs correctly, but after selecting a city and entering the county list, strange numbers appear, and finally, the escaped character is found to be in the processing server return data, which is incorrectly written as follows:

Correct wording:

Android Development Learning Experience 2--"first line Code" coolweather Project SQL statement the same "trap" dropped two times note that special characters such as escape characters are correctly written about ID field self-increase experience

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.