hi newbie here and even in QT... i can't work on non-repeating question to display...please help

Qt Code:
  1. function riddles1() {
  2. var db = openDatabaseSync("riddleDB","1.0","riddle database", 10000)
  3. var rs
  4.  
  5. db.transaction(function(tx) {
  6. rs = tx.executeSql('SELECT * FROM riddle')
  7. })
  8.  
  9. //randomized riddle
  10. for ( var i = 1; i < (rs.rows.length - 1); i++) {
  11. var n = Math.floor(Math.random() * (rs.rows.length))
  12.  
  13. }}
To copy to clipboard, switch view to plain text mode