AnsweredAssumed Answered

How to fetch the data from database into TextField.

Question asked by Deepak Ahirwar on Dec 14, 2017
Latest reply on Dec 18, 2017 by Francesca Shiekh

How to fetch the data from database into  customized Text Field.

OR
How to auto-increment the textfield value and display it in form from database.

 

CODE:

 

view.edit.php

public function display(){
global $db;
$selval1 = '';
$ri = '';
$ridata= '';

$rss = $db->query("SELECT MAX(disp_id_c)+1 FROM admin_disposition_master_cstm");
while ($row = $db->fetchByAssoc($rss)){
$selval1 = $row['disp_id_c']+1;
}
$this->ss->assign('userdataincrement', $selval1 );
$this->ss->assign('myIncrement', $this->bean->disp_id_c);
if($this->bean->disp_id_c){

}


parent::display();
}

 

editviewdef.php

array (
0 =>
array (
'name' => 'disp_id_c',
'label' => 'LBL_DISP_ID_C',
<I dont know how to call that class here for TEXTFIELD>
),
),

 

 

 

Please help me out friends,

Thanks in advance.

Outcomes