$s = $h->prepare(/select * from table where a = ?/); $s->execute($h->quote("myvalueforcolumna")); #### $s = $h->prepare(q/select * from table where a = / . $h->quote("myvalueforcolumna"); #### select col1, col2, col3 from tab_name where (? is null or foo = ?) and (? is null or bar = ?) and (? is null or baz = ?)