php查询语句问题。关于时间的数据库中存储的时间是'98-02-03 10:05:03'这种格式的,我要查询的是09-06-30这种格式的,我下面写的对吗》请教高手解答$sql="select * from customers,customers_info where customers.customers_id=customers_info.customers_info_id and TO_DAYS(customers_info.customers_info_date_account_created)=".date("y-m-d");
这样写对吗

解决方案 »

  1.   


    $sql="select * from customers,customers_info where customers.customers_id=customers_info.customers_info_id and left(customers_info.customers_info_date_account_created,8)=".date("y-m-d"); 
      

  2.   

    多表最好用left joinDATE_FORMAT(edit_time, '%Y-%m-%d') = '你的时间'
      

  3.   

    多表最好用left join 
    不一样吗