Sunday, 27 April 2014

SugarCRM:: Custom Way to retrieve data from Database in SugarCRM.


<?php

 if(!defined('sugarEntry'))define('sugarEntry', true);
require_once('include/entryPoint.php');
require_once('include/database/DBManager.php');


$db=DbManagerFactory::getInstance();
        $execute = $db->query("SELECT name FROM users");

while($row = $db->fetchByAssoc($execute)){
$result_name = $row['name'];
}

echo $result_name;

?>

No comments:

Post a Comment