2017-11-20 11 views

답변

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" => "[email protected]", 
     ] 
    ] 
); 

// WHERE "post"."restrict" < "account"."age" AND "account"."user_name" = 'foo' AND "account"."email" = '[email protected]'