Retrieve id from a table matching query
Arguments
- table
name of table
- colnames
names of one or more columns used in where clause
- values
values to be queried in fields corresponding to colnames
- con
database connection object,
- create
logical: make a record if none found?
- dates
Ignored. Formerly indicated whether to set created_at and updated_at timestamps when `create` was TRUE, but the database now always sets them automatically