摘要:
1,$data存放实体:$data['title'] = I('post.title'); // 标题 $data['content'] = I('post.content'); // 正文 $data['postdate'] = I('post.postdate'); // ... 阅读全文
摘要:
第一种方法$data = M('news')->field("title,date_format(postdate,'%Y-%m-%d') as postdate,content")->where($map)->limit(1)->find(); var_dump( M... 阅读全文
摘要:
select * from a;select *from b;用分号结束。 阅读全文
摘要:
select date_format(postdate,'%Y-%m-%d') from news 阅读全文
摘要:
$ss = str_replace(array('年','月','日'), array('-','-',''), $datetime); 阅读全文