PHP & MySQL Tip #2 - Better Way of Pagination
I’ve seen this come up a few times in #php on irc.gamesurge.net - how to find the total number of rows found, while using the LIMIT clause on a query.
I’ve seen people respond with some seriously incorrect solutions, such as ‘Simply load all of the results into an array and only show X amount’ or ‘Simple run another query without the LIMIT clause and count those rows.’
Those two, common, solutions are sadly not the best solution.
Read on to discover my solution.
Problem Solving - guide to PHP programming and debugging.
Problem solving forms part of thinking.
Interesting… so, if so many web devs and IT personnel have such a problem with problem solving, perhaps they’re just not thinking? Let’s explore some of the problems I’ve seen people encounter, and how I was baffled they lacked the problem solving skills to complete their tasks.
Quote from “Children of the Mind”
Grego shook his head. “Yes it does, Olhado. Death undoes everything.”
Olhado shrugged. “Then why do you bother doing everything, Grego? Because someday you will die. Why should anyone ever have children? Someday they will die, their children will die, all children will die. Someday stars will wind down or blow up. Someday death will cover us all like the water of a lake and perhaps nothing will ever come to the surface to show that we were ever there. But we were there, and during the time we lived, we were alive. That’s the truth — what is, what was, what will be — not what could be, what should have been, what never can be. If we die, then our death has meaning to the rest of the universe. Even if our lives are unknown, the fact that someone lived here, and died, that will have repercussions, that will shape the universe.”
Nice Article on Software Development
I found this article The Future of Software Development and found it rather interesting. As it compares the older Waterfall Model of development, to Agile Development, and why it works.
Take a look, and be prepared to be informed.
I Won a Bet With This
Apparently you can’t create variables that start with a number in PHP.
Well I made it happen.
› Continue reading
PHP and MySQL Tip #1 - Error Checks
I’d like to share with all of you some PHP Tips.
› Continue reading