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



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2UhZjEM
via IFTTT

تعليقات

المشاركات الشائعة من هذه المدونة

I am unable to figure out how to create payment collection request, after a form has been submitted in laravel

laravel, mysql transaction not working after failed one time