开发者

why MYSQL limit syntactic is opposite of overloading function in programming language? [closed]

It's开发者_如何学运维 difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.
function limit($count,$offset = 0)
{

}

here limit(3); // will work for $offset would get its default value of 0

when we have specific offset value we can do limit(3,10);

but MYSQL limit syntax does opposite it take limit 3 // which is in align with limit(3) but when want to use not default value for offset then we have to do in opposite order limit 10 , 3; where 10 is offset and 3


SELECT * FROM `table` LIMIT 3 OFFSET 10

Why not use this syntax?


It is simply because the designers designed it to be that way. Sounds like a bad answer, but I don't know how one could answer it better.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜