Skip to content

Commit

Permalink
implemented db_placeholders for the SELECT query
Browse files Browse the repository at this point in the history
  • Loading branch information
30equals committed Oct 10, 2011
1 parent b066e77 commit a59359f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pclzip_d7.module
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ function pclzip_library_exists() {
function pclzip_get_fields() {
// get the fields names
$fields_names = array();
$result = db_query("SELECT field_name FROM {field_config} WHERE type IN (:files)",array(':files' => variable_get('pclzip_field_types', "'image','file'")));
$field_types = variable_get('pclzip_field_types', "'image','file'");
$result = db_query("SELECT field_name FROM {field_config} WHERE type IN (" . db_placeholders($field_types, 'varchar') . ")");
foreach ($result as $field) {
$fields_names[$field->field_name] = $field->field_name;
}
Expand Down

0 comments on commit a59359f

Please sign in to comment.