Ok. Just figured it out. Ok:
Code:
// save the users userid
dbi_nextrow(theResult)
new aid = dbi_result(theResult, "id")
dbi_free_result(theResult)
The way you had it you were passing the SQL reference to it not the RESULT. I fixed it here. I also changed it to dbi_result instead of dbi_field this is better I think. That way you are referencing the exact variable.
Cheers!
__________________