Question: I created a stored procedure to search my database by name. I have many text files saved in database named like: a.txt, a1.txt,a2.txt,a3.txt,...

When i run my stoerd procedure only 1 resoult is showing.

```
SELECT * FROM cars WHERE name LIKE CONCAT ('%', search ,'%');

```

What is the problem here?

Answer: 
Your problem solution is

```
 SELECT * FROM cars WHERE name LIKE CONCAT ('%'. $search . '%');

```

or if you are using directly then on sql server then

```
SELECT * FROM cars WHERE name LIKE CONCAT ('%search%');

```
try this

```
 SELECT * FROM cars WHERE name LIKE '%$search%' ;

```

or this

```
    WHERE name LIKE '$search'

```