Closed ghost closed 8 years ago
I finally found my error when making another query... the correct syntax is, per example :
$articles = $database->select("articles",
["id","title","titleSanityzed","content","dateOnline"],
[
"id[!]" => $whereExclude["id"],
"ORDER" => ["dateOnline"=> "DESC"],
"LIMIT" => $limit
]
);
result -> SELECT "id","title","titleSanityzed","content","dateOnline" FROM "articles" WHERE "id" != '1' ORDER BY "dateOnline" DESC LIMIT 2
for thoses who struggle with the medoo syntax... Works like a charm!
hi, i'm trying to make a query with Where & Order and it's seems to not work. i'm using the log() to see the build query. Is anyone have the same problem that me or is it a bug ? (i know that i could use the query() but i want to pass thru the normal way ) :
i want to make : SELECT id WHERE id>=10 ORDER BY car_id ASC
return me -> SELECT "id" FROM "account" ORDER BY "carId" ASC
return me -> SELECT "id" FROM "account" WHERE "id" >= 10
return me -> SELECT "id" FROM "account" WHERE "0" IN (10) ORDER BY "carId" ASC
return me -> SELECT "id" FROM "account" ORDER BY "carId" ASC
thank ! Great library, i'm using it more and more for my project !!!