I got error when upgrading drupal 6 module to drupal 7. can anyone help me resolve this problem thanks
Notice: Undefined property: stdClass::$ket in milih_relasi_ledger() (line 2399 of C:\xampp5.6\htdocs\simkie7\sites\all\modules\product\display_ket\display_ket.module). Notice: Undefined property: stdClass::$ket in milih_relasi_ledger() (line 2399 of C:\xampp5.6\htdocs\simkie7\sites\all\modules\product\display_ket\display_ket.module). Notice: Undefined property: stdClass::$ket in milih_relasi_ledger() (line 2399 of C:\xampp5.6\htdocs\simkie7\sites\all\modules\product\display_ket\display_ket.module). Notice: Undefined property: stdClass::$ket in milih_relasi_ledger() (line 2399 of C:\xampp5.6\htdocs\simkie7\sites\all\modules\product\display_ket\display_ket.module).
Here my code
function milih_relasi_ledger(){
global $user;
db_set_active('data');
//cost center
$relasi = db_query('SELECT * FROM {relasibisnis} order by koderelasi');
$p_rel = array(NULL => t('-- Pilih Relasi --'));
foreach($relasi as $barisrelasi)
//while ($barisrelasi = db_fetch_object($relasi))
{
$p_rel[$barisrelasi->koderelasi] = t($barisrelasi->koderelasi).'-'.$barisrelasi->ket.':' .substr(str_replace(array(" - "," -","- "),"-",$barisrelasi->namarelasi),0,50);
}
db_set_active('default');
return $p_rel;
}