mercredi 11 novembre 2020

replace the boolean with string in select query

I have the query and need to convert the boolean value into string in a select query

I want to replace the boolean false to 'UnConverted' and true to 'converted' in a laravel select query

$queru=DB::table('table_name')->select(DB::Raw("replace('table_name.converted',false,'Unconverted')")->get();

getting undefiened column unconverted

how to replace boolean value to string



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire