Skip to content

MYSQL : BETWEEN operator loses condition value on JOIN in (:) used #1403

Description

@TatwiraT

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    databaseIssues or pull requests that affect the database layer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions