I have a customer table where I’m currently storing:
- Last Name
- First Name
- Middle Name
- Business Name
- Entity Type (Business or Individual)
- Address, Phone, etc.
If the customer is a business, I’m currently storing the business name in a separate field. I’m already storing the entity type, so is it even necessary to store the business name in a separate field? In my search query, I’m using “WHERE last_name LIKE ‘%$var%’ OR business_name LIKE ‘%$var%'” which is probably overkill. Should I keep it the way I have it, or should I consolidate the business name into the last name field? Thanks!
i would suggest to put the business name into the column for the last name,
because after you select, you recognize if its a company if it has no first name.
further you only need one logic to put your name into a string.