Home » Author Archive

Saving an image from a flash movie to user’s local machine hard-disk was a hectic task sometime back. To save Dynamic movie clips (which could be images or any bitmapData) on the stage as Images we had to send the whole pixel data to the server and process it to create an image, then download it on to the user machine. This task has now become...
One of the most powerful features of CakePHP is the ability to link relational mapping provided by the model. In CakePHP, the links between models are handled through associations. The associations are defined in the models as hasOne, hasMany, belongsTo etc. It is possible to define deep relationships involving many tables and retrieve data. But CakePHP...
Filed in: CakePHP, PHP/MySQL
Developers normally use functions that use Regular Expression to convert under_scored strings in to CamelCased strings. Usage of Regular Expression is quite heavy. We can use a simple yet powerful method to convert these strings to CamelCase without using RegEx in PHP. Here is the method: echo join(””, array_map(“ucwords”, explode(‘_’,...
Do you think your website is sluggish? Does it take a lot of time to download on to a user computer? Here are some techniques to make your site load faster on user computers and enhance it’s performance. These are some of the best practices followed in the Web industry. Implementing these practices has proved that your site will become 20-30%...
This tutorial teaches you to easily apply Zebra styling to your static/dynamic tables. The method of styling alternate rows with different colors is also known as Zebra styling. We normally achieve this by defining two sets of styles for odd and even rows of a table and manually adding these class names in to the table rows. When the data table is generated...
Failed To Read Auto-Increment Value From Storage Engine Error in MySQL. This is a very strange MySQL error. The error happens when trying to insert a new row in to a table. Basically this is a bug in MySQL that causes the problem but a work around is simple. The problem happens when the Auto-Increment value of a table grows beyond the limit. Just run...
Filed in: PHP/MySQL
When a form is submitted to the server, only selected values in a multiple SELECT box reaches the server. It is not possible to access the unselected options in a SELECT box from the server. Though this is not really required always, there are situations where you would want to access all the options in a SELECT tag. One example is, when you allow users...
This article basically talks about two things. 1) A Javascript code to move options from one multiple select box to another in a form. Move options from one SELECT box to another: There are two multiple SELECT boxes and one has got some OPTIONS in it. User can select one or more options from one and click on the Move button to transfer the selected...
PHP Encountered Access Violation at [some random memory address] Many of the guys who asked me about this problem faced it when trying to run PHPMyAdmin or other applications which access database, after setting up a local PHP environment on their machine under IIS. Try these fixes. Add your PHP path (the location of PHP files in your machine) to the...
Filed in: PHP/MySQL
Often, we come across situations where we need to INSERT multiple rows in to a database table from an Array, File or even from another Database Table. I am explaining various methods for inserting multiple rows using a single query using MySQL and PHP. MySQL documentation says you can use the following methods to speed up inserts: If you are inserting...

Page optimized by WP Minify WordPress Plugin