Posts Tagged ‘data

One of the frustrating things with working with MySQL is of importing large sql dump files. Either you get a ‘max execution time exceeded’ error from PHP or a ‘Max_allowed_packet_size’ from MySQL. In a recent task I needed to import a table of around a million records on a remote host, which quickly became an [...]

During a recent project I needed a database of IATA airport codes. Airports around the world are universally known by a unique three-letter code: the “International Air Transport Association (IATA) Location Identifier”. It is much easier for pilots, travel agents, frequent flyers, baggage handlers and anyone having anything to do with airlines to say and [...]

  • Comments Off
  • Tags: data

Automatically creating fake or sample data is a frequent requirement for front-end web developers. Although usually not tedious, there are times when you need to quickly and automatically generate structured data for your html forms or CMS systems for testing purposes. Faker.js is a JavaScript implementation inspired by Benjamin Curtis’s Ruby Gem Faker and Perl’s [...]

generating test data for mysql

phpguru.org offers a small and useful class to convert numbers to their textual equivalent. If you are building a accounting or invoicing application it may come in handy. The class can be downloaded form here. A sample code using the class is shown below.

NOTE: http://www.ip2location.com have done away with the free api access from their site. So the following sample code will no longer work. They now provide a free sample database on their site and also a complete paid version. iplocationtools.com offers a free geolocation API that lets you query with an ip address and get the [...]

The most common type of web application a developer encounters are database related. But rarely is the case when you have the required data in your database during testing, making it a frequent source of frustration for programmers, who than have to manually populate the database. Having a dummy set of data is always a [...]