Welcome Guest, Not a member yet? Register   Sign In
Problem using REPLACE() in mysql
#1

Hi,
this is is my select

PHP Code:
$builder $this->db->table('table_name')->select('id,REPLACE(price,'.',',') AS my_price');
echo 
$builder->getCompiledSelect(); 

The result is:

Code:
SELECT `table_name`.`id`, REPLACE(table_name.price, '.', ', ') AS my_price FROM `table_name`

there is a space after the comma (', ') of replace. Is it a bug? how can I solve it?
Reply


Messages In This Thread
Problem using REPLACE() in mysql - by atanet - 10-25-2023, 02:56 AM
RE: Problem using REPLACE() in mysql - by atanet - 10-25-2023, 06:24 AM
RE: Problem using REPLACE() in mysql - by atanet - 10-31-2023, 10:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB