Custom Amish Table Builder

Error: Expression #1 of ORDER BY clause is not in SELECT list, references column 'sugarplu_sugarplumoak_com.TB_Items.itemOrder' which is not in SELECT list; this is incompatible with DISTINCT
Query: select distinct TB_Cats.catID,catName,itemName,itemPhoto,TB_Items.itemID,TB_Reqs.requirement,xID from TB_Cats left join TB_Items on TB_Cats.catID = TB_Items.catID left join TB_Reqs on TB_Items.itemID = TB_Reqs.itemID left join Extras on xName = concat((select itemName from TB_Items where itemID=''),'::',TB_Items.itemName) where catOrder = '1' order by TB_Items.itemOrder;

Array ( [USER] => sugarplumoak [HOME] => /home/sugarplumoak [FCGI_ROLE] => RESPONDER [UNIQUE_ID] => YXnMVXu0eX_mZmOffXg1uQAAA1A [SCRIPT_URL] => /products/table-builder/ [SCRIPT_URI] => https://www.sugarplumoak.com/products/table-builder/ [HTTPS] => on [SSL_TLS_SNI] => www.sugarplumoak.com [proxy-nokeepalive] => 1 [HTTP_USER_AGENT] => CCBot/2.0 (https://commoncrawl.org/faq/) [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 [HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.5 [HTTP_IF_MODIFIED_SINCE] => Sat, 24 Jul 2021 13:48:21 GMT [HTTP_ACCEPT_ENCODING] => br,gzip [HTTP_HOST] => www.sugarplumoak.com [HTTP_CONNECTION] => Keep-Alive [HTTP_X_HTTPS] => 1 [PATH] => /usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/opt/bin [SERVER_SIGNATURE] => [SERVER_SOFTWARE] => Apache [SERVER_NAME] => www.sugarplumoak.com [SERVER_ADDR] => 172.31.62.141 [SERVER_PORT] => 443 [REMOTE_ADDR] => 3.229.142.91 [DOCUMENT_ROOT] => /home/sugarplumoak/public_html [REQUEST_SCHEME] => https [CONTEXT_PREFIX] => [CONTEXT_DOCUMENT_ROOT] => /home/sugarplumoak/public_html [SERVER_ADMIN] => webmaster@sugarplumoak.com [SCRIPT_FILENAME] => /home/sugarplumoak/public_html/products/table-builder/index.php [REMOTE_PORT] => 54086 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => GET [QUERY_STRING] => [REQUEST_URI] => /products/table-builder/ [SCRIPT_NAME] => /products/table-builder/index.php [PHP_SELF] => /products/table-builder/index.php [REQUEST_TIME_FLOAT] => 1635372117.8705 [REQUEST_TIME] => 1635372117 [argv] => Array ( ) [argc] => 0 ) There was a problem connecting to the database. Please let us know if you continue to experience problems.