Scusa un po':

Codice PHP:
...
while(
$row sqlite_fetch_array($result,SQLITE_BOTH)){
... 
dov'è che valorizzi $result