我想比较两列medoo而不是它的值。
$issues = $database->select("issues","*",[
"AND" => [
"projectid" => 1,
"estimated_hrs[<]" => "timespent"
]
]);
但这样做时会出错。是否有任何解决方案?
答案 0 :(得分:0)
在此处查看列关系:https://medoo.in/api/where
$database->select("post", [
"[>]account" => ["author_id" => "user_id"],
], [
"post.id",
"post.content"
], [
"AND" => [
// Connect two column with condition sign like [=], [>], [<], [!=] as one of array value
"post.restrict[<]account.age",
"account.user_name" => "foo",
"account.email" => "foo@bar.com",
]
]
);
// WHERE "post"."restrict" < "account"."age" AND "account"."user_name" = 'foo' AND "account"."email" = 'foo@bar.com'