I would like to use array variable in PostgreSQL array_append(). If I use array directly then its works but not when using variable.
$name= {1,2,3};
$Name_key_array={4};
I would like to find result by using following way-
$name='array_append(name, $Name_key_array)';
or
"SELECT array_append($Books->name, $Name_key_array) as b";
Waiting to see some great ideas.
Thanks to all
$name = "[1,2,3]"
and$Name_key_array = "[4]"
, or$name = "ARRAY[1,2,3]"
the idea here is that the array declaration should be in postgresql not php, as for postgresql to understand it. give it a try withing this concept and let me know.