<span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Greetings, </span><div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">This error is brought up many times in the forums but never given a response.  It seems to be caused by data in the database from my experience.</div>


<div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">I have a database (MySQL/Linix) that lost access to display leads two days ago and now today we lost access to contacts.  From the vtigercrm.log it seems to be located in the table vtiger_crmentity and ORDER BY createdtime field.</div>


<div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><div><font size="1">Wed Nov 16 10:59:28 2011,123 [30916] DEBUG contact_list - Prepared sql query being executed :</font></div>


<div><font size="1">  ORDER BY vtiger_crmentity.createdtime DESC LIMIT 0, 20</font></div><div><font size="1">Wed Nov 16 10:59:28 2011,125 [30916] INFO VT - PearDatabase -&gt;ADODB error  Query Failed:</font></div><div><font size="1">  ORDER BY vtiger_crmentity.createdtime DESC LIMIT 0, 20::-&gt;</font></div>


<div><font size="1">  [1064]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 &#39;ORDER BY vtiger_crmentity.createdtime DESC LIMIT 0, 20&#39; at line 1</font></div>


<div><br></div><div>I have a suspicion that the real problem is before this but the logs don&#39;t show this.  Also the database seems to be in good health.  I have attached the full trace for this error as well.</div><div>


<br></div><div>Any insights would be greatly appreciated.  Warm regards,</div></div><font face="Arial, Helvetica, &#39;Sans Serif&#39;" size="3"><span style="border-collapse:collapse"><span style="color:rgb(51,51,51);font-size:11px;line-height:13px"><p>


<font size="2">Stephen Mack</font></p>
<p><img src="http://efronteras.com/m/sig/stephen.png" style="border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial"><br>USA <a href="tel:%2B1%20%28717%29%20744-8120" value="+17177448120" target="_blank">+1 (717) 744-8120</a> • Chile: <a href="tel:%2B56%20%2802%29%20918-9950" value="+5629189950" target="_blank">+56 (02) 918-9950</a> • Skype: efronteras.stephen<br>



</p><p>Hear our students thoughts: <a href="http://efronteras.com/audioblog" style="color:rgb(153,0,0);text-decoration:none;font-weight:bold" target="_blank">http://efronteras.com/audioblog</a> </p><p></p></span></span></font><br>