-
SitePoint Zealot

Create Function in MySQL 4.1.12
I am trying to run the following SQL on MySQL version 4.1.12 on my live machine.
CREATE FUNCTION distance(lat1 float, long1 float, lat2 float, long2 float) RETURNS float(11)
RETURN (3958.75 * acos(sin(lat1/57.2958) * sin(lat2/57.2958) + cos(lat1/57.2958) * cos(lat2/57.2958) * cos(long2/57.2958 - long1/57.2958)))
Would this not be supported with 4.1.12?
I am running this fine on my local version of Zend Core.
Any ideas?
-
You need version 5.0 or later.
-
SitePoint Zealot

Thanks, I suspected as much. My host is reluctant to upgrade. They are also using PHP 4.1.2
I have also developed some of my code using SimpleXML which is only bundled with PHP 5 so I'm struggling on 2 fronts.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks