Fresh PHP news, tutorials, tips and much more

Posts Tagged ‘mysql’

Calculating circle distance in MySQL and Propel

Thursday, May 1st, 2008

Martynas Jusevicius today poted new post on his blog about great-circle distance caculation in MySQL and Propel.

Eventually the simple distance formula that I have blogged about turned out to be too inaccurate, even for locations within city bounds. I needed to use a formula to calculate great-circle distance which takes into account that the Earth is a sphere.

With his written sql examples he shows how you can store temproary variables in MySQL query and gives code witch process calculations.

Post tagged with: , , ,

Posted in Advanced | No Comments »

ZF example application part 5 Creating Models with Zend_Db and adding an Administration Module

Wednesday, April 30th, 2008

Padraic Brady posted 5th part of his articles series “An Example Zend Framework Blog Application”. New article shows how work with Zend_Db and how to make administration module.

Today’s entry adds a few more layers to our slowly growing blog application. First of all I decided to add an Entries Model and Authors Model to the mix, primarily to get ready for when we can add new entries to our blog. This leads to where we can create new Entries; we add an Administration Module to the application with it’s own distinct Layout

This article shows how to create mysql table and make model to handle administration of this example application. If you are novice to Zend Framework you should read all parts of series.

Post tagged with: , , , , ,

Posted in Advanced | No Comments »