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