The correct SQL query?

There is a table in the database users (id, firstname, lastname) ,books . Please tell me what you need to write the query in the database that he brought up all the users whose name includes the number 3 . If the user names are stored in the table "users" and subsection "firstname" . Thank you very much for the reply
July 9th 19 at 10:44
1 answer
July 9th 19 at 10:46
Solution
select * from users where firstname like '%3%'
where's the catch?
Thank you very much! The catch is that while I'm a novice..and not even the thought that it's so simple - Conor_Ko commented on July 9th 19 at 10:49
It is better not to use *. The returned field is better to specify clearly.
select `id` from `users` where `firstname` like '%3%', for example - meta.Lehne commented on July 9th 19 at 10:52

Find more questions by tags PHP