Android - Crash when i have apostrophe in database and select data
<p>I select data from my sqlite database. My problem is that when in database are apostrophes ("I' m John" - for example) and i try to select data, then my application crash.</p>

<p>If i don' t have apostrophes in database, then everything is all right.</p>

<p>My select data function:</p>

<pre><code>String query = "SELECT * FROM " + mainCollumn  + " WHERE used=0 " + " AND season &lt;= " + seasons + " ORDER BY RANDOM() LIMIT " + count ;

    SQLiteDatabase db = this.getReadableDatabase();
    Cursor cursor = db.rawQuery(query, null);

    if(cursor.moveToFirst()){
        do {
            Question question = new Question(Integer.parseInt(cursor.getString(0)),
                    cursor.getString(1),cursor.getString(2),cursor.getString(3),cursor.getString(4),cursor.getString(5),
                    Integer.parseInt(cursor.getString(6)));

            questionList.add(question);
        }while(cursor.moveToNext());
    }
</code></pre>

<p>Thanks for any help.</p>
