$hDB['default']=array('servertype'=>'mysql',
'hostname'=>'192.168.29.128',
'user'=>'root',
'password'=>'',
'port'=>'3306');
$hconn=$this->opendb('default');
$hconn=$this->opendb('default');
$objModel= new Model($hconn);
$result=$objModel->query("select * from TB_thule;");
You can get the result from mysql as "Object" with setup the configure.ini .
mysql_result_type = "object" ; object ,array
you can call the value with oject instead of array like below.
$result->field_name;
However there is strong way for query maintenance and for database administrator to handle.
Below is example . If you want more information, go to Model chapter.
$objSample=new SampleModel($hconn);
$result=$objSample->query("select * from DB_FRAMEWORK.TB_POST;");
foreach($result[0] as $var=>$value) {
$this->setResponse($var,$value);
}
$arr_sql['member_id']=1;
$objSample->update_member($arr_sql);
$result=$objSample->select_member($arr_sql);
foreach($result[0] as $var=>$value) {
$this->setResponse($var,$value);
}