Ok, I understand what you are doing. The only part that is confusing me me is the last part you showed me.
[code]
$result = odbc_exec($conn, "Select top 1 * from words order by rnd(id)");
$randomWord = odbc_fetch_into($result, $row) ? $row[0] : 'ERROR';
[code]
Where is the variable $row coming...