title: Unknown Column Error in on CLAUSE using alias MYSQL
body: <p>I have this set of SQL command  </p>
  
  <pre><code>SELECT CONCAT (
          REPEAT('    ', (COUNT(parent.itemName) - 1)),
          node.itemName
          ) AS 'NAME_',
      node.itemNo AS 'ITEM_CODE',
      node.assemblyNo AS 'ASSEMBLY_NO.',
      ref_item_type.itemTypeName AS 'TYPE_',
      node.description AS 'DESCRIPTION_',
      node.serialNo AS 'SERIAL_NO',
      node.hardwareNo AS 'HARDWARE_NO',
      node.modelNo AS 'MODEL_NO',
      node.version AS 'VERSION_',
      ref_item_uom.uomName AS 'UNIT_',
      ref_item_cat.catName AS 'CATEGORY_',
      ref_item_product_type.prodTypeName AS 'PRODUCT TYPE',
      man_network.networkName AS 'NETWORK_',
      ref_item_package.packageName AS 'PACKAGE_',
      node.reorderPoint AS 'REORDER_POINT',
      node.cost AS 'COST_',
      node.price AS 'PRICE_',
      node.surcharge AS 'SURECHARGE_',
      node.validity AS 'VALIDITY_',
      node.validityUnit AS 'VALIDITY_UNIT',
      node.isSpecialItem AS 'SPECIAL_',
      node.isActive AS 'IS_ACTIVE_',
      node.itemIndex AS 'ITEM_INDEX'
  FROM man_item AS node,
      man_item AS parent
  LEFT JOIN ref_item_type ON ref_item_type.itemTypeNo = node.itemType
  LEFT JOIN ref_item_uom ON ref_item_uom.uomNo = node.uomNo
  LEFT JOIN ref_item_cat ON ref_item_cat.catNo = node.itemCat
  LEFT JOIN ref_item_product_type ON ref_item_product_type.prodTypeNo = node.prodTypeNo
  LEFT JOIN man_network ON man_network.networkNo = node.networkNo
  LEFT JOIN ref_item_package ON ref_item_package.packageNo = node.packageNo
  WHERE node.lft BETWEEN parent.lft
          AND parent.rgt
      AND node.isVisible = 'Y'
  </code></pre>
  
  <p>And I got some error</p>
  
  <blockquote>
    <p>1054 - Unknown column 'node.itemType' in 'on clause'</p>
  </blockquote>
  
  <p>Did I miss something?</p>
  
  <p>PS: I forgot to mention my fields in my table
  here it is btw</p>
  
  <pre><code>itemIndex   
  itemNo
  subItem 
  assemblyNo
  refNo  
  prodTypeNo 
  networkNo
  packageNo
  itemName
  itemType
  itemSubTypeNo
  itemCat
  uomNo
  serialNo
  hardwareNo
  modelNo
  version
  cost
  price
  surcharge
  validity
  validityUnit
  logoLocation
  fileHash
  lft
  rgt
  isSpecialItem
  isActive
  </code></pre>
  
  <p>My bad for not posting the table structure earlier, makes more confusing and being vague</p>