Dear vtigers,<br><br>This mail is regarding the new API that was added to vtiger CRM. <br><br><span style="font-family: courier new,monospace;">File: include/database/PearDatabase.php</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Class: PearDatabase</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Function: pquery</span><br style="font-family: courier new,monospace;">
<br>Description:<br><div style="margin-left: 40px;">This function lets us execute prepared statement queries. It is similar to function query.<br><br>Given below is an example of how to use pquery instead of query function.
<br><br><span style="font-family: courier new,monospace;">$db-&gt;query(&quot;select * from vtiger_tablename where column1=$value1, column2=$value2&quot;);</span><br><br>This can be translated to:<br><br><span style="font-family: courier new,monospace;">
$db-&gt;pquery(&quot;select * from vtiger_tablename where column1=?, column2=?&quot;, array($value1, $value2));</span><br></div><br>For the pquery function:<br><div style="margin-left: 40px;">The first parameter should be direct sql or prepared statement.
<br>The second parameter is list of values that needs to be substitutated for the question marks (positional parameters)<br>used in the prepared statement. It can be none as well.<br></div><br>Note:<br><div style="margin-left: 40px;">
In most of the places the query function call was changed to pquery function call in vtiger CRM with suitable modification<br>and it is integrated in our vtiger 5.0.4 validation testbuild2. [One of the reason why the delay was in putting out the build]
<br><br></div>We request our community to help us testing the product thoroughly because of these core changes.<br><br>Kindly send us your feedback.<br><br>Regards,<br>Prasad<br>vtiger Team<br><br><br>