guys
I want to check in my database that is there any similar version. Now, if I'm running the sql statement in the mysql it gives me back results unfortunately the script below will return FALSE. The function receives the proper $var i already checked it with var_dump().
Any help would be greatly appreciated .
public function checkForSimilarities($var)
{
$sql = new \Zend\Db\Sql\Sql($this->getAdapter());
$select = $sql->select()
->from($this->tableName)
->where("version LIKE '%$var%'");
$stmt = $sql->prepareStatementForSqlObject($select);
$results = $stmt->execute();
return $this->hydrate($results);
}
public function hydrate($results)
{
$szamla = new \Zend\Db\ResultSet\HydratingResultSet(
$this->hydrator,
$this->entityPrototype
);
return $szamla->initialize($results);
}