Replace Function (Mysql)

Replace function does not work!

$criteria->select = ‘*, sum(replace(field,",",""))’;

how to do this?

Hi andjelko

check this


$criteria->select = array('*', 'sum(replace(field,",","")) AS SumData');

also you have to define $SumData as a public variable in your AR model

Let Inform us if it works!

Thanks a lot,

this is working