sqlite3 to mysql query - Gerard