I can able to concatenate the values using the following code
$sqlselect = "UPDATE billing_details SET SRF = CONCAT(Year, ID)";
but it returns the result value as "NULL". Kindly help me to solve this issue
Table Structure:
Year *Varchar(5)*
ID *Int(10)*
SRF *Varchar(100)*
Result Table:
MySql CONCAT function is return NULL
if any argument value if null value, see blow
SELECT COCAT(NULL, 1)
SELECT COCAT(1, NULL)
>NULL
If you want to keep other values while any argument value have null then use IFNULL() function to exclude NULL values
In your query
$sqlselect = "UPDATE billing_details SET SRF = CONCAT(IFNULL(Year, ''), IFNULL(ID, ''))";