THE ORB
Starting the studio

Unknown column 'x' in 'field list'

A script is looking for information the database does not have — nearly always because its setup file was never imported.

groupsThat feature stops workingpersonYou can fix this

Do this first

Find the .sql file that came with that script and import it into your database.

bug_reportPaste your whole console instead

What it means

The query is valid SQL but names a column (or table) the database does not have. The schema and the code disagree.

What causes it

Ordered by how often it is the answer.

  1. 1

    The resource's SQL was never imported

    Every script that stores data ships a .sql file. Skipping it is the usual cause, especially with a script installed in a hurry.

  2. 2

    The script expects a different framework's schema

    ESX uses users/identifier, QBCore uses players/citizenid. A script written for one, run against the other, asks for columns that do not exist.

  3. 3

    A framework version difference

    ESX Legacy moved several columns; QBCore renamed some between releases. The column exists in the version the script was written for, not in yours.

  4. 4

    A typo, or the wrong case

    Column names are case sensitive on Linux MySQL depending on configuration.

  5. 5

    `Table doesn't exist`

    Same problem one level up: the .sql was not imported at all, or was imported into a different database than the one in the connection string.

How to tell which one is yours

SHOW COLUMNS FROM users;

Compare to what the query asks for. If the table itself is missing, check which database you are actually connected to:

SELECT DATABASE();

Where to look

The .sql file that shipped with the resource, and the framework's own schema.

How to fix it

Import the resource's SQL, then verify:

mysql -u user -p yourdatabase < resource/install.sql

Add a missing column without touching the rest:

ALTER TABLE users ADD COLUMN phone VARCHAR(20) NULL;

Still stuck on your own code?

This page is what this error usually means. Paste your console into Server Fixer and it will rank everything in it and tell you what to do first, and if you would rather not touch it, ORBIE can repair the script and hand the resource back ready to drop in.

bug_reportOpen Server Fixer

Errors that travel with this one