[Vtigercrm-developers] vtiger 5.0.4 API

Prasad prasad at vtiger.com
Sat Nov 24 01:45:05 PST 2007


Dear vtigers,

This mail is regarding the new API that was added to vtiger CRM.

File: include/database/PearDatabase.php
Class: PearDatabase
Function: pquery

Description:
This function lets us execute prepared statement queries. It is similar to
function query.

Given below is an example of how to use pquery instead of query function.

$db->query("select * from vtiger_tablename where column1=$value1,
column2=$value2");

This can be translated to:

$db->pquery("select * from vtiger_tablename where column1=?, column2=?",
array($value1, $value2));

For the pquery function:
The first parameter should be direct sql or prepared statement.
The second parameter is list of values that needs to be substitutated for
the question marks (positional parameters)
used in the prepared statement. It can be none as well.

Note:
In most of the places the query function call was changed to pquery function
call in vtiger CRM with suitable modification
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]

We request our community to help us testing the product thoroughly because
of these core changes.

Kindly send us your feedback.

Regards,
Prasad
vtiger Team
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20071124/8c53b273/attachment-0003.html 


More information about the vtigercrm-developers mailing list