lookup field sql query error when insert/delete record

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
sacgtdev
Veteran Member
Posts: 68
Joined: 2020-06-10 11:14

lookup field sql query error when insert/delete record

Post by sacgtdev » 2023-01-17 06:28

Appgini 5.97

SELECT `trial_recfertiliser`.`id` as 'id', IF( CHAR_LENGTH(`trial1`.`trial_code`), CONCAT_WS('', `trial1`.`trial_code`), '') as 'trial_id', IF( CHAR_LENGTH(`fertiliser_conversion`.`fertiliser_name`), CONCAT_WS('', `fertiliser_conversion`.`fertiliser_name`), '') as 'fertiliser_name' FROM `trial_recfertiliser` LEFT JOIN `trial` as trial1 ON `trial1`.`id`=`trial_recfertiliser`.`trial_id` LEFT JOIN `fertiliser_conversion` as fertiliser_conversion1 ON `fertiliser_conversion1`.`id`=`trial_recfertiliser`.`fertiliser_name` WHERE 1=1 and `trial_recfertiliser`.`id` = '3';

I have the above query return as error when inserting record. The table have two lookup fields: trial_code & fertiliser_name
. However, the second lookup field is incorrect in the query strings. It shall be
IF( CHAR_LENGTH(`fertiliser_conversion1`.`fertiliser_name`), CONCAT_WS('', `fertiliser_conversion1`.`fertiliser_name`), '')

Which file should I correct?

sacgtdev
Veteran Member
Posts: 68
Joined: 2020-06-10 11:14

Re: lookup field sql query error when insert/delete record

Post by sacgtdev » 2023-01-20 01:15

please ignore. issue rectify.. update incCommon.php

Post Reply