procedures

Mysql procedure to modify limit and offset

Just a thought in my mind but would it not be possible to createa function in MySQL that can modify the LIMIT within a query The clause would be a simple calculation function that would work out the offset depending on the pageno * perpage Example SELECT * FROM items PAGE(4,20) this would be the same as SELECT * FROM items LIMIT 10...

C++ Function Conventions?

Just had a 'Fundamentals of Programming' lecture at uni and was told that the convention for using/declaring functions is to have the main() function at the top of the program, with functions/procedures below it and to use forward declarations to prevent compiler errors. However, I've always done it the other way - functions at top main...