the situation is similar to this link . The brother of this post has no answer. Now he has the same problem. Paste the code
below.$map = ["products.insurance_status"=>1];//
if( input("get.times") && input("get.times") < 7 ){
$time = return_times(input("get.times"));
//bug
$map["order.pay_time"] = ["between time", [strtotime($time["start"]),strtotime($time["end"])]];
}
$list = db("xmb_insurance_products")
->alias("products")
->field("products.*,company.company_name,count(order.id) num,sum(order.order_amount) price")
->join("xmb_insurance_company company", "products.insurance_company_id=company.id", "left")
->join("xmb_insurance_order order", "order.insurance_id=products.id and order.order_status=1","left")//,and status=1,
->group("products.id")
->order("products.id desc")
->where($map)
->paginate(7,false,[ "type"=> "page\Page","var_page"=>"page","query" => $this->request->get()]);
result:
ask for help: how should the following statements be handled
$map["order.pay_time"] = ["between time", [strtotime($time["start"]),strtotime($time["end"])]];
problem description
the environmental background of the problems and what methods you have tried
related codes
/ / Please paste the code text below (do not replace the code with pictures)