pdo search apply and condition
function getRowFromMatchingValue($table, $field, $val){$suggestedRows =
array();$stH = $this->dbH->prepare("SELECT * FROM $table WHERE $field LIKE
:val");$stH->setFetchMode(PDO::FETCH_OBJ); $stH->bindValue(':val',
'%'.$val.'%', PDO::PARAM_STR);$stH->execute();while($sRow = $stH->fetch())
$suggestedRows[] = $sRow;return $suggestedRows;}I want to apply and
condition $field!=$val how I can do this?
No comments:
Post a Comment