Mjoin get Error
Mjoin get Error
Smti Yogyakarta
Posts: 10Questions: 2Answers: 0
Get error when use Mjoin
Message: explode() expects parameter 2 to be string, object given
Filename: Database/Query.php
Line Number: 393
server script :
public function loadsurat($post)
{
Editor::inst( $this->editorDb, 'sr_surat', 'no_surat_dir' )
->fields(
Field::inst( 'sr_surat.no_surat_dir' ),
Field::inst( 'sr_surat.tgl_terima' ),
Field::inst( 'sr_surat.nomor_agenda' ),
Field::inst( 'sr_surat.tgl_agenda' ),
Field::inst( 'sr_surat.tgl_surat' ),
Field::inst( 'sr_surat.no_surat' ),
Field::inst( 'sr_surat.asal_surat' ),
Field::inst( 'sr_surat.hal' ),
Field::inst( 'sr_surat.hari' ),
Field::inst( 'sr_surat.tgl_hal' ),
Field::inst( 'sr_surat.tempat' ),
Field::inst( 'sr_surat.instruksi' ),
Field::inst( 'sr_surat.subdit' ),
Field::inst( 'sr_surat.file_upload' )
->setFormatter( 'Format::ifEmpty', null )
->upload( Upload::inst( $_SERVER['DOCUMENT_ROOT'].'/v2/uploads/images/__NAME__' )
->db( 'bmn_files', 'id', array(
'filename' => Upload::DB_FILE_NAME,
'filesize' => Upload::DB_FILE_SIZE,
'web_path' => Upload::DB_WEB_PATH,
'system_path' => Upload::DB_SYSTEM_PATH
) )
->validator( function ( $file ) {
return $file['size'] >= 5000000 ?
"Files must be smaller than 500 KB" :
null;
} )
->allowedExtensions( array( 'jpg', 'jpeg', 'bmp', 'png', 'pdf', 'doc', 'docx' ), "Mohon Upload dengan tipe PDF, Word atau Gambar" )
)
)
->leftjoin('bmn_files', 'sr_surat.file_upload', '=', 'bmn_files.id')
->join(
Mjoin::inst( 'subdit' )
->link( 'sr_surat.no_surat_dir', 'sr_dispo.no_surat_dir' )
->link( 'subdit.kodesubdit', 'sr_dispo.subdit' )
->fields(
Field::inst( 'kodesubdit' )
->options( Options::inst()
->table( 'subdit' )
->value( 'kodesubdit' )
->label( 'namasubdit' )
),
Field::inst( 'namasubdit' )
)
)
->process( $_POST )
->json();
}
}
This discussion has been closed.
Answers
PLeae help me
What version of the PHP libraries are you using for Editor please? Line 393 in Query.php of 1.7.4 (the current release) is
return $this->_pkey;
.Allan
oh i'm sory it's v 1.5.5
Could you update to the current release (its a free upgrade)? That should resolve the issue.
Thanks,
Allan