Hi guys i am trying to store id value from one table to another table column (topic_lookup_masters_id).
so far i have made a join query and trying to get that id..so while storing i am getting error as
General error: 1366 Incorrect integer value: '[]' for column 'topic_lookup_master_id' at row 1
Here is my store function:
$Topic_id = DB::table('topic_lookup_masters')
->join('qtype_lookup_masters', 'qlm_topic_id', '=', 'topic_lookup_masters.tlm_topic_id')
->select('topic_lookup_masters.id')
->get();
$qtype_lookup_master = new Qtype_lookup_master();
$qtype_lookup_master->topic_lookup_master_id = $Topic_id;
Tried using the type cast as (int) but still its not working.
Probably you try to populate the 'topic_lookup_masters_id' with a string or with null. Check if the associated value is int.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.