Closed FirestarterUA closed 5 years ago
Medoo Query like: $links = $this->db->debug()->select("links", "*", [$isBot."[<]" => "limit_".$isBot, "ORDER" => ["created_at" => "ASC"], "LIMIT" => 100]); $isBot - is string.
$links = $this->db->debug()->select("links", "*", [$isBot."[<]" => "limit_".$isBot, "ORDER" => ["created_at" => "ASC"], "LIMIT" => 100]);
Generate an sql query like: SELECT * FROM "links" WHERE "yandex" < 'limit_yandex' ORDER BY "created_at" ASC LIMIT 100
SELECT * FROM "links" WHERE "yandex" < 'limit_yandex' ORDER BY "created_at" ASC LIMIT 100
But must: SELECT * FROM "links" WHERE "yandex" < "limit_yandex" ORDER BY "created_at" ASC LIMIT 100
SELECT * FROM "links" WHERE "yandex" < "limit_yandex" ORDER BY "created_at" ASC LIMIT 100
Quotes are not properly working
If limit_yandex is column, you should use
limit_yandex
[ $isBot . "[<]limit_" . $isBot, "ORDER" => ["created_at" => "ASC"], "LIMIT" => 100 ]
https://medoo.in/api/where Columns Relationship section
Medoo Query like:
$links = $this->db->debug()->select("links", "*", [$isBot."[<]" => "limit_".$isBot, "ORDER" => ["created_at" => "ASC"], "LIMIT" => 100]);
$isBot - is string.Generate an sql query like:
SELECT * FROM "links" WHERE "yandex" < 'limit_yandex' ORDER BY "created_at" ASC LIMIT 100
But must:
SELECT * FROM "links" WHERE "yandex" < "limit_yandex" ORDER BY "created_at" ASC LIMIT 100
Quotes are not properly working