# MySql Query help needed

**URL:** <https://forum.kirupa.com/t/mysql-query-help-needed/194797>\
**Category:** programming\
**Created:** [July 26, 2006, 12:42pm UTC](https://forum.kirupa.com/t/mysql-query-help-needed/194797 "2006-07-26T12:42:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimjiminyjimjim](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@jimjiminyjimjim](https://forum.kirupa.com/u/jimjiminyjimjim)\
**Post date:** [July 26, 2006, 12:42pm UTC](https://forum.kirupa.com/t/mysql-query-help-needed/194797/1 "2006-07-26T12:42:15Z")

</div>

I currently have this query:

```php

$query = "SELECT * FROM stock WHERE model LIKE '%".$search."%'";

```

But what I also would like to do is search using two variables i.e

SELECT \* from stock WHERE model LIKE $search1 BUT ALSO WHERE make LIKE $search2

Hope this makes sense!

Whats the correct PHP/MySQL for this query?
