I am getting this error:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Weddings' in 'where clause': SELECT id from galleries_types WHERE name="Weddings"; Array ( ) in catering_gallery_add_image_submit() (line 195
Why does it think 'weddings' is a column? It clearly is
where name='Weddings'. What's up with the blank array on the end?
This is the code I am using.
$a = db_query('SELECT id from galleries_types WHERE name="'.$form_state['values']['id'].'"');