Syntax error or access violation: 1305 FUNCTION gpstracker.ST_Longitude does not exist
bossmanpl opened this issue · comments
Deployed your system on raspberry pi, all seems to work even in logs have seen my sinotrack 906 was sending gps coords.
But having problem on main and notification screen:
SQLSTATE[42000]: Syntax error or access violation: 1305 FUNCTION gpstracker.ST_Longitude does not exist (Connection: mysql, SQL: select
`id`, `name`, `type`, `config`, `closed_at`, `sent_at`, `created_at`, `updated_at`,
`telegram`, `date_at`, `date_utc_at`,
`alarm_id`, `position_id`, `trip_id`, `vehicle_id`,
ROUND(ST_Longitude(`point`), 5) AS `longitude`, ROUND(ST_Latitude(`point`), 5) AS `latitude`
from `alarm_notification` where `vehicle_id` = 1 and `closed_at` is null order by `alarm_notification`.`id` desc)
in [/var/www/html/gps/vendor/laravel/framework/src/Illuminate/Database/Connection.php ](http://192.168.2.15/)(line 795)
in [/var/www/html/gps/vendor/laravel/framework/src/Illuminate/Database/Connection.php ](http://192.168.2.15/)-> runQueryCallback (line 755)
in [/var/www/html/gps/vendor/laravel/framework/src/Illuminate/Database/Connection.php ](http://192.168.2.15/)-> run (line 424)
in [/var/www/html/gps/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php ](http://192.168.2.15/)-> select (line 2736)
in [/var/www/html/gps/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php ](http://192.168.2.15/)-> runSelect (line 2724)
in [/var/www/html/gps/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php ](http://192.168.2.15/)-> Illuminate\Database\Query\{closure} (line 3278)
in [/var/www/html/gps/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php ](http://192.168.2.15/)-> onceWithColumns (line 2725)
in [/var/www/html/gps/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php ](http://192.168.2.15/)-> get (line 717)
in [/var/www/html/gps/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php ](http://192.168.2.15/)-> getModels (line 701)
Builder->get()
in [/var/www/html/gps/app/Domains/Dashboard/Service/Controller/Index.php ](http://192.168.2.15/)(line 225)
->withAlarm() ->withVehicle() ->withPosition() ->withTrip() ->list() ->get(); }}
Can you help me ?
Also is there a way to add new commands ?, i have 906 model which has a possibility to switch off engine, i would like to add it to system.
You need MySQL 8.0.12 or higher.
Commands are not fixed, you can write any command as message text.
Installed version is sufficient:
MariaDB 10 (Localhost via UNIX socket)
MariaDB
Server version: 10.3.32-MariaDB - Source distribution
Protocol ver: 10
Any other tips where i can search a problem ?
Like i said, every other page in system works, only dashboard and notifications does not work (sql error)
MariaDB is not supported because GIS functions only included in MySQL 8.0.12 or higher. You should check the README requirements.
Alright, so it seems you can close it. Thanks.