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
Hei,
When I tried to execute a join query SELECT `db_adverts`.* FROM `db_adverts` INNER JOIN `db_adverts` AS `c` ON `db_adverts`.`views` <= `c`.`limit` OR **'TIMESTAMP_VALUE_HERE'** BETWEEN `c`.`start_at` AND `c`.`end_at` WHERE `db_adverts`.`desktop` = :db_adverts.desktop: AND `db_adverts`.`enable` = :db_adverts.enable: GROUP BY `db_adverts`.`id`
the query keeps only the portion before the lase occurrence of colon ":" of the value TIMESTAMP_VALUE_HERE.
I manage to bypass this issue using UNIX TIME TRANSFORMATION
thanks
The text was updated successfully, but these errors were encountered:
Can you provide the code you use to create that query, please.
jim-parry
changed the title
MYSQL : BETWEEN OPERATOR LOOSES CONDITION VALUE ON JOIN IN (:) USED
MYSQL : BETWEEN operator loses condition value on JOIN in (:) used
Nov 3, 2018
Looking at your query you're not quoting the time value so it would expect that to be a keyword. Also - there wouldn't be a colon in there since time() returns an integer. However, if you were using something like "04:23:58" you'd have to provide a quote around it.
This does not appear to be a bug in the framework.
Hei,
When I tried to execute a join query
SELECT `db_adverts`.* FROM `db_adverts` INNER JOIN `db_adverts` AS `c` ON `db_adverts`.`views` <= `c`.`limit` OR **'TIMESTAMP_VALUE_HERE'** BETWEEN `c`.`start_at` AND `c`.`end_at` WHERE `db_adverts`.`desktop` = :db_adverts.desktop: AND `db_adverts`.`enable` = :db_adverts.enable: GROUP BY `db_adverts`.`id`
the query keeps only the portion before the lase occurrence of colon ":" of the value
TIMESTAMP_VALUE_HERE
.I manage to bypass this issue using UNIX TIME TRANSFORMATION
thanks
The text was updated successfully, but these errors were encountered: