February 14, 2009 – 10:39 am
Here’s a simple stored procedure I find myself using for MySQL over and over again. If you use a person’s email address as a database key, you may need to occasionally update their email address, and as such, you should update all references. Here’s a simple stored procedure to accomplish this:
DELIMITER $$
DROP PROCEDURE IF EXISTS [...]
October 17, 2008 – 1:58 pm
Sometimes more than just connection strings need to be stored to a settings or configuration file of some kind. If you are building a mult-tier application and your project is a class library with no run-able code, you can’t just throw settings into an app.config file. Likewise, you wouldn’t want to put your tier-specific settings [...]
October 17, 2008 – 7:06 am
In working with SQL server 2005, I came across this useful query which will loop through every table and every field in a database searching for specified text. This can really come in handy when you’re debugging someone else’s un-documented database and you know the text, but you’re not sure where it is stored in [...]
January 4, 2008 – 3:54 pm
When using MySQL to store things such as files, it is best to use a blob field. If you’re using a blob field, but having trouble with inserting some data into it (like a file), you might want to check the MySQL environment varibale max_allowed_packet. The max_allowed_packet variable can be found in your configuration file [...]