摘要:
Thinkphp常常需要关联操作,数据库中需要用到join连接查询,根据对方的条件进行关联条件查询(同时获得两个表的数据) 这里有两个表:article(文章表)、comment(评论表): 模型: //评论表 class Comment extends Model { public functio 阅读全文
摘要:
获取当前时间,转为时间戳比较大小,得出它的天数 /** *获取当前时间 *format=1精确到天 *format=2精确到分 */ function getCurrentDate(format) { var now = new Date(); var year = now.getFullYear( 阅读全文