Function returning blank string : <p>This function keeps on returning a blank string.</p>

<pre><code> public String getRandomWord() {
        int id = (int)(Math.random())*(numberOfRows())+1;
        SQLiteDatabase db = this.getReadableDatabase();
        Cursor res =  db.rawQuery( "select word from words where id="+id+"", null );
        String s = "";
        if (res.moveToFirst())
            s = res.getString(res.getColumnIndex("word"));
        res.close();
        return s;
    }
</code></pre>
