Using the like Clause with a variable in PHP

LilE

New Member
I have a query that is dynamically constructed with variables. I would like for all of my conditions to also have a like statement.My Code is:\[code\]$where .= " AND name=" . "'" . $name . "'";\[/code\]I would like to use:\[code\]$where .= " AND name Like "%'.$name.'%";\[/code\]But I am unsure how to structure it.Thanks
 
Back
Top