摘要: 1,$data存放实体:$data['title'] = I('post.title'); // 标题 $data['content'] = I('post.content'); // 正文 $data['postdate'] = I('post.postdate'); // ... 阅读全文
posted @ 2015-01-19 17:23 Coding_Yong 阅读(772) 评论(0) 推荐(0) 编辑
摘要: 第一种方法$data = M('news')->field("title,date_format(postdate,'%Y-%m-%d') as postdate,content")->where($map)->limit(1)->find(); var_dump( M... 阅读全文
posted @ 2015-01-19 16:49 Coding_Yong 阅读(2075) 评论(0) 推荐(0) 编辑
摘要: select * from a;select *from b;用分号结束。 阅读全文
posted @ 2015-01-19 16:46 Coding_Yong 阅读(523) 评论(0) 推荐(0) 编辑
摘要: select date_format(postdate,'%Y-%m-%d') from news 阅读全文
posted @ 2015-01-19 16:34 Coding_Yong 阅读(125) 评论(0) 推荐(0) 编辑
摘要: $ss = str_replace(array('年','月','日'), array('-','-',''), $datetime); 阅读全文
posted @ 2015-01-19 15:51 Coding_Yong 阅读(999) 评论(0) 推荐(0) 编辑