order

order

Sequentially Rename All Image Files In A Directory With PHP

Monday, March 2, 2009 - 12:36

The following function will rename all of the image files in a directory to be sequential. The parameters are the path of the directory that the files are in and the name of a function that will be used to sort the array of files through the PHP usort() function.

Category: 

Force Sorting Of VARCHAR Data In MySQL

Thursday, September 18, 2008 - 10:05

If you find that you are having trouble sorting data in a VARCHAR column in a MySQL database then you can try the following trick.

Lets say that you had the values 1,200,30,4000 and 5 and that you inserted them into the database in that order. When the following query is run on this data:

Category: