[eluser]coldfire82[/eluser]

Hi,

I am not sure what caused this problem because on localhost its working.

and even if I do

on my server phpmuadmin SQL, it does work. But, the query that I execute from CI says,

Code:

`A Database Error Occurred`

Error Number: 1305

FUNCTION <mydatabase>.SQRT does not exist

SELECT DISTINCT geodb.postalcode FROM geodb WHERE ( 6367.41*SQRT ( 2* ( 1-cos (RADIANS(geodb.latitude)) *cos('1.0368209942311') *( sin (RADIANS(geodb.longitude)) *sin('0.3132031478148') +cos(RADIANS(geodb.longitude)) *cos('0.3132031478148') ) -sin(RADIANS(geodb.latitude)) *sin('1.0368209942311') ) ) <= '10' )

Instead of selecting <mydatabase>.SQRT it should select only SQRT because otherwise it gives error if I do

Code:

`select <mydatabase>.SQRT(16);`

Any hints on what might be causing it?

Thanks