Find and replace in MySQL

How many times have you used find and replace in your code editor? I’m betting tons.

Did you know that find and replace is possible within mysql?

Lets say you have a field that stores all your company email addresses but one day someone changes your companies domain. So all your emails change from you@wickedsitedev.com to you@wicked.com
Believe me, I’ve seen it happen.
Read More >

Queing JQuery functions

The JQuery built in functions are great. They make some really cool effects possible really easily.

But occasionally you find something that just doesn’t seem to play properly.

Take the below example for instance. What I’d like to happen is that when the button is clicked div#one fades out slowly and then div#two pops in.

$("button").click(function(){
$("div#one").fadeOut("slow");
$("div#two")show();
});

Read More >

Excel writes my code for me

OK so that’s a bit of an exaggeration but it does help me.

Imagine I have to build a drop down box which lets the user choose a date.

Something like

I’m bored already.
Read More >

Running MsSQL Stored Procedures in PHP

Sometimes I need to run SQL Server Stored Procedures from PHP. Some development managers prefer to keep all the SQL queries stored inside SQL Server rather than embedded into the PHP code directly.

I can understand the philosophy but it’s certainly not something I’m used to. The argument is that if the query is stored in an SP then any member of the team can access and update or fix the query whether they have any PHP knowledge or not.

It kind of makes sense.

Fortunately PHP has some functions to handle this.
Read More >

Adding a bit more UX with key detection.

The other day I was busily building a web application that uses a lot of popup style modular windows and I had a thought.

Users expect certain things. Like the fact that the sun will come up in the morning and the fact that the escape key closes things that have opened. The only problem is that this escape key behavior doesn’t work in websites. Unless we tell it to that is.

So what do we need to do?
Well firstly I’ll be adding this functionality with the aid of JQuery so I’m assuming that you have that setup properly.
Now we need to detect the key stroke. Read More >