Fresh PHP news, tutorials, tips and much more

Posts Tagged ‘query’

XPath: run queries in PHP

Thursday, May 15th, 2008

Another post on Mind Tree about running XPath queries in PHP. Author describes what is XPath and where is used. In article you also find good examples of code.

XPath is a language that allows you to address parts of an XML document, making XSLT transformations practically necessary. It also makes it an invaluable tool for managing XML data in applications such as Web applications.

Post tagged with: , ,

Posted in Advanced | No Comments »

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 »