type: SQL Error
error: (Error #145) Table './relatebase_rfm/rbase_AccountModules' is marked as crashed and should be repaired

query:
SELECT a.ID AS RECORD_ACCOUNT_ID, a.AcctName AS RECORD_MASTER_DATABASE, IF(a.DbseName, a.DbseName, a.AcctName) AS MASTER_DATABASE, a.UserName AS MASTER_USERNAME, a.HostName AS MASTER_HOSTNAME, pivot.Password AS MASTER_PASSWORD, IF(ctc.FirstName IS NULL, CONCAT(pivot.FirstName,' ',pivot.LastName),pivot.Company) AS adminCompany, IF(ctc.Email IS NULL, pivot.Email, ctc.Email) AS adminEmail, IF(ctc.FirstName IS NULL, pivot.FirstName, ctc.FirstName) AS adminFirstName, IF(ctc.LastName IS NULL, pivot.LastName, ctc.LastName) AS adminLastName, IF(ctc.FirstName IS NULL, CONCAT(pivot.FirstName,' ',pivot.LastName),pivot.Company) AS companyName, IF(ctc.Phone IS NULL, pivot.Phone, ctc.Phone) AS companyPhone, IF(ctc.Fax IS NULL, pivot.Fax, ctc.Fax) AS companyFax, IF(ctc.Address IS NULL, pivot.Address, ctc.Address) AS companyAddress, IF(ctc.City IS NULL, pivot.City, ctc.City) AS companyCity, IF(ctc.State IS NULL, pivot.State, ctc.State) AS companyState, IF(ctc.Zip IS NULL, pivot.Zip, ctc.Zip) AS companyZip, m.ID AS mid, m.Status AS ModuleStatus, mi.Source AS ExtractConfig /** old from -- FROM rbase_account a LEFT JOIN rbase_userbase pivot ON a.AcctName=pivot.UserName LEFT JOIN rbase_UserbaseUserbase ub ON pivot.UserName = ub.Parent_UserName AND ub.Type='Primary' LEFT JOIN rbase_userbase ctc ON Child_UserName=ctc.UserName, rbase_AccountModules am, rbase_modules m LEFT JOIN rbase_modules_items mi ON m.ID=mi.Modules_ID AND mi.Types_ID=5 -- */ FROM rbase_account a LEFT JOIN rbase_userbase pivot ON a.AcctName = pivot.UserName LEFT JOIN rbase_UserbaseUserbase ub ON pivot.UserName = ub.Parent_UserName AND ub.Type = 'Primary' LEFT JOIN rbase_userbase ctc ON Child_UserName = ctc.UserName LEFT JOIN rbase_AccountModules am ON a.ID=am.Account_ID LEFT JOIN rbase_modules m ON am.Modules_ID = m.ID AND m.SKU = '051' LEFT JOIN rbase_modules_items mi ON m.ID=mi.Modules_ID and mi.Types_ID = 5 WHERE /* a.ID=am.Account_ID AND am.Modules_ID=m.ID AND */ a.AcctName='cpm192' AND /* m.SKU='051' */ 1 GROUP BY a.AcctName