我想在数据库中导入excel记录时更改日期格式,例如,如果我的excel日期格式为“ 03/06/2019”,那么,我想将其更改为“ 2019-06-03”。
date('Y-m-d', PHPExcel_Shared_Date::ExcelToPHP($transactiondate))
我的约会日期在$transactiondate
变量中。
答案 0 :(得分:2)
尝试这样
select t1count,t2count,tab1.UID from (SELECT count(*) as t1count,UID from t1 GROUP by UID
) tab1
inner join
(SELECT count(*) as t2Count,uid from t1 WHERE vid in (SELECT vid from t2) group by uid) tab2
on tab1.UID=tab2.UID