Archive:

 

Archive for March, 2008


If you are using windows (with XAMPP) to develop your MySQL applications, you might currently be using phpMyAdmin for your DBA tasks. The phpMyAdmin package is an awesome tool and is a must have, however due to the fact that it runs under Apache and PHP – it can be tricky to use when dealing [...]



 

I have taken the debug function about as far as I can think of. This function will now take a variable and display it all in a nice easy to read format. It will also give the name of the variable being examined. It works with html, using htmlentites. It preserves the tab layout formatting [...]



 

Some hosts disabled the ini setting allow_url_fopen. This also means that the ability to easily grab images by calling imagecreatefromjpeg($img) where $img is a url for an external image does not work. This is a shame as this technique is pretty easy.. PLAIN TEXT PHP: $remote_img = 'http://www.somwhere.com/images/image.jpg'; $img = imagecreatefromjpeg($remote_img); $path = 'images/'; imagejpeg($img, [...]



 

When coding PHP, or more frequently when trying to customise or fix someone elses code, it can sometimes be tricky to figure out exactly what is going wrong. In this kind of situation, it is often neccessary to go through the flow of the script and view the contents of the various strings and arrays [...]



 

This is a nice little function which I struggled to find elsewhere on the web. As discussed elsewhere this is not the kind of thing that should be included in a public facing script, but for administration tools etc its pretty handy: PLAIN TEXT PHP: function add_column_if_not_exist($db, $column, $column_attr = "VARCHAR( 255 ) NULL" ){ [...]



 

There aren't many things you can't do with PHP. One of the things you can do is deal with zip files. PHP has a built in class for dealing with zip files which allows you to create them, unpack them, add and delete things from them and generally use them within your scripts. Recently on [...]



 

What could be more convenient than having all of your business systems integrated into one online package. No more hassles moving information from online to offline systems. No more out of date or vague information regarding stock figures or supplier invoices. For an online business with a well specified and rigorously backed up dedicated server, [...]



 

One of the big tasks that any ecommerce retail business must undertake is the continual updating and inserting of products into the catalogue. Done one by one, this task can take a ridiculous amount of time. In some instances there is no better option, but in the vast majority of cases there is! Product Feed [...]



 

Dynamic database driven web sites tend to use various GET variables to define which content to display on that particular page. This is perfectly normal and reasonable. However it does make things a little confusing for search engine spiders as not every GET variable pertains to alternative content. Often GET is used for session, or [...]



 

Sometime in MySQL you want to copy an entire table from one database to a separate database. One example of when you would want to do this is if you are making a backup of a table before you apply some kind of processing to that table. There is nothing worse than ruining a database [...]