2
I’m setting up a search system for a corporate guide and at the time of searching I’m only able to search for a specific word in a table, for example: pizza. But the ideal would be to see if there is a company called "pizza" or if any that does not have "pizza" in the name is part of the category "pizzeria", for example, and bring it.
This is the structure I’m using to relate a company to the categories:
| empresa |
|------------|
| id_empresa |
| nome |
| categoria |
|--------------|
| id_categoria |
| nome |
| categoria_empresa |
|----------------------|
| id_categoria_empresa |
| id_empresa |
| id_categoria |
That’s the search I’m doing:
SELECT * FROM empresa WHERE nome LIKE %"pizza"%
Take a look at the [tour] you can vote on everything on the site, plus accept an answer in sias questions.
– Maniero