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

c - ALSA programming: how to stop immediately -

c++ - How to add Crypto++ library to Qt project -