Category Archives: Coding

All kinds of Programming.

Export table to csv in mysql

By | March 12, 2013

It is possible to export the contents of a table directly to csv format from within mysql. It is useful when migrating large tables. CSV export import is much faster for large tables compared to mysqldump/mysql command. To generate csv from the table use the following command Make sure that the path to the output… Read More »

How to compress images in php using gd

By | March 12, 2013

Php applications might need to do some image processing if they are allowing users to upload pictures of somekind. This can include cropping, watermarking, compressing etc. To compress an image the quality needs to be adjusted. Here are few examples The above function will process a jpg/gif/png image and compress it and save to jpg… Read More »

Convert excel to csv in php

By | March 11, 2013

When working with data import and export for example, file formats like csv and excel are commonly used. Data can be exported to csv format and imported elsewhere. Also data might be entered manually in an excel file and then imported in the database. So there might be a need to convert excel files to… Read More »