jeudi 30 juillet 2015

Does DB::raw affect when uploaded on server?

Currently using this code to fetch data on mysql and its working on my localhost but when I uploaded it on our AWS server it stop sorting?

$stores = DB::table('stores')->select('storename','id','photo','address',DB::raw("( 3959 * acos( cos( radians('$lat') ) * cos( radians( '$lat' ) ) * cos( radians( longitude ) - radians('$lon') ) + sin( radians('$lat') ) * sin( radians( latitude ) ) ) ) AS distance"))->orderBy('distance')->where('domain',$domain->appEnv)->take(25)->get();

Is there something that is being affected when I uploaded on AWS?

Note that our DB is on a different server for RDS




Aucun commentaire:

Enregistrer un commentaire