in reply to SQL do update is killing me

A quick workaround:

"UPDATE settings SET [limit]='$p'"OR
"UPDATE settings SET [limit]=$p"

Specifying the field name within the squares should take care of any reserved word conflicts. Double check the 'limit' field data type to make sure nobody changed it on you - there are times when our coworkers get creative without telling anyone...