⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Callback Field post error



ryuusoultaker
  • profile picture
  • Member

Posted 11 September 2014 - 08:01 AM

I have two callback field in my grocery crud for maintaining dynamic add field and dynamic multiple select that detect change event from another field. but when i tried to save the form, the value that come from dynamic multiple select field detected as array and not sent into after insert callback.

 

everytime i tried to save the form , it gave this error

 


Error Number: 1054

Unknown column 'Array' in 'field list'

INSERT INTO `tb_master_tender` (`nomor_tender`, `no_dpb`, `nama_tender`, `keterangan`, `id_jenis`, `rekanan`, `file_url1`, `file_url2`, `total_peserta`, `wkt_kirim`, `tgl_tutup_pendaftaran`, `tgl_open`, `peminta`, `keyword`) VALUES ('123', '2345', '', '', '6', Array, '', '', '', '', '', '', '', '45624a44b8')

Filename: C:\xampp\htdocs\etender\system\database\DB_driver.php

Line Number: 330

 

 

 

can someone tell me where i got it wrong?


Amit Shah
  • profile picture
  • Member

Posted 14 September 2014 - 08:45 AM

If u look at the query error - the value expected out in the table is like a string or something and what u passing in there is an array. If that's the possibile issue (as it is being forseed for now)  what u need to do is have a callback before insert / update and there - u need to extract the values from array and store it against the field name as string .. and return the $POST_ARRAY ... then it might stop giving error.

 

Happy GCing :)


ryuusoultaker
  • profile picture
  • Member

Posted 15 September 2014 - 03:07 AM

thank you for your suggestion amit shah, i have another question..is it possible to have two callback after insert in grocery crud?


Amit Shah
  • profile picture
  • Member

Posted 15 September 2014 - 04:49 AM

well technically it dose not have a chain of responsibility designed - but what u can do is.. call 1.. and @the end of the 1 .. call other function.. that technically achieves the same sort of functionality as such.