I'm working through this tutorial online: <http://goo.gl/qnk6U>

The database table: ajax\_search

```
Firstname | Lastname | Age | Hometown | Job
-------------------------------------------
Joe       | Smith    | 35  | Boulder  | CIA   
Steve     | Apple    | 36  | Denver   | FBI
```

(Types are all varchar except age is an int.)

My question. Is the sql select statement below written correctly to query "Joe 35"? For some reason, I can only query "Joe" and it works, but not combining search terms. 

```
$sql = "select * from ajax_search where FirstName like '%$rec%' or LastName like '%$rec%' or Age like '%$rec%' or Hometown like '%$rec%'";

```