Skip to content

Instantly share code, notes, and snippets.

@msanroman
Created December 11, 2011 19:29
Show Gist options
  • Save msanroman/1462252 to your computer and use it in GitHub Desktop.
Save msanroman/1462252 to your computer and use it in GitHub Desktop.
query_concat
<?php
private function query_concat($key, $value, $query){
$query.'AND {$key} = ';
if($value != '') $query = $query.'"'.$value.'"';
else $query = $query.'NULL ';
return $query;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment