Here is a really good tip for using MySQL SUM IF functions if you need to do a bunch of different counts or sums on the same data set based off some conditional statements.
There is a great article over at nettuts in regards to password security, properly hashing and storing passwords. It covers most of the basics including:
- What is hashing
- Storing hashed passwords
- Hash collision
- Rainbow Tables
- Hash algorithm speed
- Salting / Nonces
- Which hashing function to use
For any developer creating applications or systems with user login, this is a must read. There is also a hashing class provided to use with your own code. Check out the article:
If you have any questions about any of the topics, drop me a comment.
Sometimes clients want to put all their products online in a database but don’t want to manage them as they may already be doing so in some kind of spreadsheet or offline database (Excel, Numbers, Filemaker, etc). For them, they don’t want to learn any new systems but want to have both areas, offline and online, up to date and mirroring each other. If you run into something like this, it’s very easy to populate your table via a CSV file upload.
I was coding out a basic contact form today with the usual name, address, email etc. I was building out the country select menu and noticed I already had code for building it via an array and building it from a database table. So I decided to put the two up against each other and see which one was faster.
If you have a database driven site, like this one, the database will slowly increase in size and the tables will get bigger as your site content and traffic increases. Over time some areas that were fast to load in the browser start to slow down. Why is that? Well one possibility is that the database queries that generate the content on your page are not optimized. As your database keeps growing, these queries get slower and slower until the load time of a page is actually noticeable to one of your visitors. The first step is identifying slow queries.