Robert Granlund
asked on
Codeignitor Query
I have a query that works but I need to add to it and I am not sure how. I need to pull two different fields.
Right now it looks like this
But I need to pull the First_Name and the Last_Name
Like this:
Right now it looks like this
<?php
SELECT
CASE
WHEN o.business_type_id = 1 THEN o.first_name
WHEN o.business_type_id = 4 THEN o.legal_name
ELSE o.business_name
END
But I need to pull the First_Name and the Last_Name
Like this:
<?php
SELECT
### Line 1 ###
CASE
WHEN o.business_type_id = 1[b] THEN o.first_name AND .o.last_name[/b]
WHEN o.business_type_id = 4 THEN o.legal_name
ELSE o.business_name
END
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.