提前致谢!
<?
$sql = "SELECT *,date_format(course_date, '%d %b %Y') as course_date_format FROM course WHERE course_status = ? ORDER BY course_create_by";
$sql = "SELECT *,from_time_format(course_date, '%h:%i') as course_from_time_format FROM course WHERE course_status = ? ORDER BY course_create_by";
$sql = "SELECT *,to_time_format(course_date, '%h:%i') as course_to_time_format FROM course WHERE course_status = ? ORDER BY course_create_by";
$sth = $dbh->prepare($sql);
$sth->execute(array($status));
while($result = $sth->fetch(PDO::FETCH_OBJ)){
$course_id = $result->course_id;
$course_title = nl2br($result->{"course_title_".$lang});
$course_title1 = nl2br($result->{"course_title1_".$lang});
$course_date = $result->course_date_format;
$course_from_time = $result->course_from_time;
$course_to_time = $result->course_to_time;
$course_time = $course_from_time_format."-".$course_to_time_format;
?>
答案 0 :(得分:3)