当你在mysql子查询中使用了limit,那么恭喜你,你会看到
ERROR 1235 (42000): This version of MySQL doesn’t yet support ‘LIMIT & IN/ALL/ANY/SOME subquery’
limit
在mysql中本来的效率就不高,mysql于是也禁止在子查询中使用limit,可是如果非要用呢
比方说需求是:
- 一等奖5名
- 二等奖15名
- 获了一等奖的不能再获二等奖
直觉告诉我们,下边的sql是可以的。
当你在mysql子查询中使用了limit,那么恭喜你,你会看到
ERROR 1235 (42000): This version of MySQL doesn’t yet support ‘LIMIT & IN/ALL/ANY/SOME subquery’
limit
在mysql中本来的效率就不高,mysql于是也禁止在子查询中使用limit,可是如果非要用呢
比方说需求是:
直觉告诉我们,下边的sql是可以的。
今天把typecho上的文章也迁移到Hexo上来,可以专注纯粹的创作学习了,哈哈。
留下批处理文件,供需要者使用!
批处理文件地址
如有疑问,请文末留言交流或邮件:newbvirgil@gmail.com 本文链接 : https://newbmiao.github.io/2015/07/18/typecho-to-hexo.html
pear channel-discover pear.phpdoc.org
pear install phpdoc/phpDocumentor
# 对文件
phpdoc -f filename.php -t docs
# 对目录
phpdoc -d directory -t docs
如有疑问,请文末留言交流或邮件:newbvirgil@gmail.com 本文链接 : https://newbmiao.github.io/2015/06/17/use-phpdoc-to-render-api-document.html
Hexo基于node.js,可用于生成静态博客,结合github和Mac,可以专注创作了。
深入学习见文末引用。
brew install node
sudo npm install hexo-cli -g #全局安装
Hexo使用命令:
1 | hexo init <folder> #执行init命令初始化hexo到你指定的目录 |
var prop,obj={a:1.b:2,c:3};
for (prop in obj) {
if (obj.hasOwnProperty(prop)) {
//遍历只属于该对象的属性
}
}
var obj={
cnt:0,
related:null
};
if("cnt" in obj){
//do some code
}
function MyError(msg){
this.msg=msg;
}
MyError.prototype = new Error();
var person={
age:11,
name:'virgil'
};
var myPerson=Object.create(person);
myPerson.age=12;
console.log(myPerson.age,person.age);//12 11
function Person(name){
this.name;
}
function Author(name){
Person.call(this,name); //继承构造器
}
Author.prototype = new Person(); //原型继承
Array非固定长度,可以动态增删,因此数组是引用类型
var arr=[1,2,3];
var arrRef=arr;
arr.push(4);
console.log(arrRef);
《JavaScript核心概念及实践》
如有疑问,请文末留言交流或邮件:newbvirgil@gmail.com 本文链接 : https://newbmiao.github.io/2015/03/28/maintainable-javascript-note.html