Server Side/PHP
날짜간 쿼리 검색
Dev. Tool
2015. 3. 14. 15:34
$sql = "select name, in_date from 테이블명 where status = 'Y' and
date_format(in_date, '%Y-%m-%d') between '2011-01-01' and '2014-12-31'";
$result = mysql_query($sql);
while($print = mysql_fetch_array($result)){
$explode_dates = $print['in_date'];
$contents = explode(" ",$explode_dates);
echo $print['name'] . $contents[0] . "<br />";
}