D
D
Daniil Sukhikh2018-08-05 18:56:55
MySQL
Daniil Sukhikh, 2018-08-05 18:56:55

How to change sql expressions?

I have a sql query:

SELECT `id`,`name`,`price`,`old_price`,`img`,`sale` FROM `shops` WHERE `categories` LIKE 'привет'

How can I search not only on the `categories` column, but on two columns at once? e.g. `categories` and `name`

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir, 2018-08-05
@danchiksux

https://www.w3schools.com/sql/sql_and_or.asp

C
Cat in coat, 2018-08-05
@CatInCoat

WHERE `categories` LIKE 'hello' OR name LIKE 'bye'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question