Any technique that saves round trips to the database pays for itself exponentially over time. MySQLs bulk Insert or Update syntax is one of those techniques.
Not all real-world reporting requirements align well with how your data is organized. In my case, I had to produce sales reports tied to a US Holiday (which varies year-to-year).
With a little extra effort, you can construct a single query that returns multiple rows using the SQL IN operator.
From there, you can convert the query results into a language construct that is easy to work with.
Migrating a database over to Amazon RDS isn’t an all day event, but you will run into a couple snags. This post points out two issues that I ran into and quick solutions.
The MySQL GROUP_CONCAT function isn’t a well-known feature, but it is one of the most useful functions that exists in MySQL. I call it the “loop-killer”. Here are a few ways to put it to use on your site.
There are dozens of different ways to be a victim of an SQL injection attack. This article offers a more example-driven approach to learning about SQL Injection and how to avoid it.
Performing validation at the database level not only protects the integrity of our data, but also presents a performance enhancement while simplifying our application code.
If your table is updated often, queries will rarely pull from cache. Depending on your situation, performance may be more important than up-to-the-second data accuracy.
If you’re coming from server-side development, Web SQL might appear to be both limiting and difficult to grasp. You’re used to sending a request to…
As a web programmer, not a day goes by without needing to touch SQL in some form. Some days you're lucky enough to be modeling…