FiveM oxmysql: 'Unknown column ... in field list' – Fix
The error
[oxmysql] Unknown column 'metadata' in 'field list'
What it means
The query names a column that does not exist in that table. The script is fine; the database is out of date. Common causes: the resource's .sql file was never imported, you updated a resource but not its tables, or the script was written for a different framework schema (for example ESX users versus QBCore players).
The fix
- Open the resource folder and find its
.sqlfile (often in the root or ansql/folder). - Back up your database first.
- Import the file in HeidiSQL, phpMyAdmin or your host's database tool, or add the single missing column:
-- example only: check the resource's own SQL for the right type
ALTER TABLE `players` ADD COLUMN `metadata` LONGTEXT NULL;Then restart the resource. If the column name looks like it belongs to a different framework, you need a version of the script made for your framework.
Related errors
- qbcore getcoreobject nil
- fivem couldnt load resource fxmanifest
- fivem oxmysql no such export
- esx getsharedobject deprecated
Related tools: FiveM script generator · Fix a FiveM Lua error · all script generators