PDO Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'index DESC' at line 32
SQL : select contractors.ID as ID, contractors.Rec_Active as Rec_Active, contractors.Rec_Delete as Rec_Delete, contractors.CompanyName as CompanyName, contractors.ManagerName as ManagerName, contractors.City as City, contractors.Address as Address, contractors.Tel as Tel, contractors.Fax as Fax, contractors.Mobile as Mobile, contractors.WebSite as WebSite, contractors.Email as Email, contractors.JobCount as JobCount, contractors.JobSize as JobSize, contractors.Grade as Grade, contractors.Score as Score, contractors.CertNo as CertNo, contractors.CertExp as CertExp, contractors.Description as Description, contractors.CurJob as CurJob, contractors.CurSize as CurSize, contractors.JobCount - contractors.CurJob as FreeJob , JobCount - CurJob as FreeJob, JobSize - CurSize as FreeSize, city.NameCity as cityName FROM contractors LEFT JOIN city ON city.ID = contractors.City where Rec_Delete=0 and Rec_Active=1 Order by index DESC
0 /home/skedc/domains/skedc.ir/public_html/peymankaran/classes/RAAKModel.php(77): PDOStatement->execute()
1 /home/skedc/domains/skedc.ir/public_html/peymankaran/classes/RAAKModel.php(180): RAAKmodel->_execQuery('select \n\t\t\t\t\t\t ...')
2 /home/skedc/domains/skedc.ir/public_html/peymankaran/classes/contractors.php(375): RAAKmodel->_getAll('select \n\t\t\t\t\t\t ...')
3 /home/skedc/domains/skedc.ir/public_html/peymankaran/classes/contractors.php(132): contractors_Model->ListRecords('index', '')
4 /home/skedc/domains/skedc.ir/public_html/peymankaran/webmaster/contractorsAdmin.php(72): contractors_Controller->ListRecords('index')
5 /home/skedc/domains/skedc.ir/public_html/peymankaran/index.php(37): contractorsAdmin->index('index')
6 {main}