摘要: 1,sql查询发生在昨天的记录SELECT * FROM `articles` WHERE created_at=(current_date - interval 1 day) and created_at=(current_date - interval 0 day)2,关联表遍历分数最高的三条相关记录表a,s其中关联字段为a.id=s.article_id取前三条记录sql语句为SELECT * FROM `articles` aJOIN (SELECT * FROM `scores` ORDER BY score DESC LIMIT 3)sWHERE a.id = s.articl 阅读全文
posted @ 2011-01-30 18:11 lonelystarxing 阅读(474) 评论(0) 推荐(1) 编辑
摘要: 1,首先需要找到自己的mysql所在文件夹(如D盘) 打开命令提示符 默认为C:\User\Username>或者是C:\Documents and settings\Administrator 这是win7和xp的区别2,D: Enter进入D盘 利用cd命令进入mysql下bin文件夹 D:\>cd xampp\xampp\mysql\bin3, 利用mysql命令打开界面 D:\xampp\xampp\mysql\bin>mysql -u root -r Enter -u后为用户名 回车后需要输入数据库密码 Enter Passowrd:******这样你就顺利进入到m 阅读全文
posted @ 2011-01-30 17:26 lonelystarxing 阅读(9735) 评论(0) 推荐(1) 编辑