Jun
03
2009
0

Trees and tribulations

I was working on a small webapp a couple of months ago that would help my girlfriend manage her research data on horses. Amongst her wishes was that she would be able to view the selected horse’s family tree.

Now this is a specific wish that contains two generic problems.

  • Retrieving hierarchical data from flat dataset
  • Representing hierarchial / genealogical data in a browser

More info after the jump:
(more…)

Written by Robert van der Linde in: code, random thoughts | Tags: , , ,
Oct
30
2008
0

PHP 5, MySQL, Windows & Stored procedures

For people like me who develop on and for windows (at times) and who like to use MySQL’s stored procedures here’s a quick tip.
Some PHP versions give the following warning when you call stored procedures in PDO.

(more…)

Written by admin in: code | Tags: , , ,
Oct
30
2008
4

Finding geographical distances between two points in MySQL 5

For a project I’m working on I needed to find the distances between two points to be able to let users ask the application questions like: “How many points of type X (coworkers, jobs, gas stations, donutshops) are within a radius of point y (my home, my office, my previous donut shop). Or what is the nearest point x from point y.

I solved this problem with a stored procedure. Below the click are two stored procedures that achieve the same goal.

(more…)

Written by admin in: code | Tags: , , , ,

Powered by WordPress | Aeros Theme | TheBuckmaker.com WordPress Themes