Home php BD search

BD search




How to implement a search as in Liga17: http://league17.ru/pokedEx.php?sp_id=235


1.Vod “s” shows us a list of Pokemon who in the name is the letter “s”

2. For 1 We will redirect us in http://league17.ru/pokedex.php?sp_id=1

  1. If nothing is found writes “Pokemon on your request not found.”

Answer 1, Authority 100%

The query will look something like this

select * from table where name like% "s"%

Here is not a bad article Safe and convenient search in MySQL

Answer 2

Use Like .

Answer 3

Off Top) But I would not do it). Leave the search by name using the LIKE operator.
Why I would not do as they:

  1. Enter 1000 in the search – and you will see Pokemon at number 001 – this is not entirely true.
  2. and suddenly in the name of the Pokemon there will be a number? then you will not find it so (

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions