k o D
Joined: 21 Feb 2008
Posts: 11
|
| Posted: Mon Feb 25, 2008 8:29 am Post subject: Using getListQuery("Contacts") with the web form p |
|
|
Hello everybody!
First please can you be patient? English is not my langage.
Well. This is my problem: I would like use the web form plugin to access and modify data of VTiger. For what? Simply for a business intelligence level.
That's why using web services are the best solution for me.
So I have written one of my functions in soap/webforms.php:
Code: function getListOfContacts() {
global $adb;
require_once('include/utils/ListViewUtils.php');
$result = $adb->query("select firstname,lastname from vtiger_contactdetails where accountid is not NULL");
//$msg = $adb->query_result($result,$adb->num_rows($result),0);
$monArray = array();
$i=0;
while ($row = $adb->fetch_array($result)) {
$monArray[$i] = $row;
$i++;
}
return json_encode($monArray);
}
getListOfContacts() is running fine but that's not a "sexy" solution because I compose myself the SQL Query.
I would like use the API and particulary the method getListQuery("NAME_OF_MODULE") in include/utils/ListViewUtils.php.
But when i call the function my script crash.
Code: $list_query = getListQuery("Contacts");
I think that's a problem of identification but I don't know how to do...
Thank you a lot for all your explanations and sorry for my bad English. :) |
|