Using mysql like clause in php -


mysql query works fine me :

select * `review_details` category = 'italian' , review '%cozy%'; 

it display results.

select *  `review_details`    category = 'italian'    , review %cozy%'; 

but when execute in php script :

$word = 'cozy'; $select = mysqli($con,"select *  `review_details`    category = 'italian'    , review %.$word.%' "); 

then not display result.

please see query correct, when change condition gives result.

change like %.$word.%' like '%$word%'


Comments

Popular posts from this blog

arrays - PHP Shopping Cart Variable and Object errors -

javascript - jQuery "chosen": conflict with 'selected' attribute in option tag -