MySQL allows you to export a query directly in to a CSV file that can be opened by Microsoft Excel.
This is the basic syntax:
select fields from table into outfile '/path/to/file_name.csv' fields terminated by ',' optionally enclosed by '"' lines terminated by '\n';
The export file that is created “file_name.csv” must not already exist, the MySQL user must have write permissions to the directory the file will be created in, and the FILE permission within MySQL.
See the MySQL manual: SELECT Syntax
June 2nd, 2008 | Posted in MySQL | No Comments
Flickr is possibly the largest collection of public photos on the planet. Flickr has an API which allows anyone with some programming skills to write their own programs and websites, etc using their images and data.
Yesterday I came across the http://taggalaxy.de/ which allows you to view Flickr as a solar system. You search for an image tag and this becomes the centre of your solar system, and the most popular associated tags are the surrounding planets.
It’s another different way of exploring this vast collection!
May 30th, 2008 | Posted in Photography | No Comments
Here’s the syntax for creating a UTF-8 database in MySQL as I can never remember it!
CREATE DATABASE `databasename` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */;
May 3rd, 2008 | Posted in MySQL | No Comments
This is the first entry on my new blog! This site is hosted by Web Hosting Buzz. So far I am impressed with the ease of configuration and installation. This WordPress installation was installed by a few simple clicks using their administration tools, saving me from downloading, installing and configuring it all myself.
All I need now is a new theme/design and some worthwhile content!
April 14th, 2008 | Posted in Uncategorized | 1 Comment