You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The BETWEEN operator doesn't seem to work in a has() relation filter :
$entity->has("service", ["date BETWEEN ? AND ?", "2024-02-01", "2024-02-29"]); // error
$entity->has("service", ["? <= date AND date <= ?", "2024-02-01", "2024-02-29"]); // works
$result = $entity->find(["pupil_id = ?", 12], []);
I get this error :
500 Internal Server Error
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '[table][rel_field].BETWEEN '2024-02-01' AND '2024-02-29')' at line 1 [[project_path]/vendor/bcosca/fatfree-core/db/sql.php:230]
of course, the same filter directly on the sub-entity work well : $res2 = $entity2->find(["date BETWEEN ? AND ?", "2024-02-01", "2024-02-29"]);
The text was updated successfully, but these errors were encountered:
I've tested this myself and was not able to reproduce.. it's working fine here.. at least for mysql, postgre and sqlite.. is this a mariaDB only glitch maybe? 🤔
tested with
$author = newAuthorModel();
$author->has('news', ['created_at BETWEEN ? and ?', $time, $time]);
$author->load();
Hi ;
The
BETWEEN
operator doesn't seem to work in ahas()
relation filter :I get this error :
of course, the same filter directly on the sub-entity work well :
$res2 = $entity2->find(["date BETWEEN ? AND ?", "2024-02-01", "2024-02-29"]);
The text was updated successfully, but these errors were encountered: