[Vtigercrm-developers] vtws_query does not return any result.

deamen deamen at gmail.com
Thu May 14 03:02:08 GMT 2015


Hi All,
I am trying to use vtws_query to inquiry the database but with out any
success. I am using the following code:
include_once 'include/Webservices/Utils.php';
include_once 'include/Webservices/Query.php';
$current_user = CRMEntity::getInstance('Users');
$current_user->retrieveCurrentUserInfoFromFile(1);
try {
        $q = "SELECT * FROM Leads WHERE lastname LIKE '%NA%'";
        $q = $q . ';'; // NOTE: Make sure to terminate query with ;
        $records = vtws_query($q, $current_user);
        echo "1:";
        print_r($records);

} catch (WebServiceException $ex) {
        echo $ex->getMessage();
}

The $records is always NULL.
I did some debug, it seems the code was terminated in function
return_application_language() inside /include/utils/utils.php.
The procedure is: vtws_query() -> vtws_listtypes() ->
return_application_language().
And return_application_language() is calling
return_app_list_strings_language($language) which is defined in
/vtlib/Vtiger/Deprecated.php. 

Can anyone advise me what did I do wrong?
Thanks



--
View this message in context: http://vtiger-crm.2324883.n4.nabble.com/vtws-query-does-not-return-any-result-tp16230.html
Sent from the vtigercrm-developers mailing list archive at Nabble.com.


More information about the vtigercrm-developers mailing list