Updating SQL statements

Trying to get database stuff to work