Jump to content

[SOLVED] Whats the code for 'contains'


wilson210484

Recommended Posts

Hi everyone i such a newb!!!

 

What i want to do is in the product_info.php page of my site i want an if statement,

 

if the model number contains '(g)' then say well anything. i have no idea how to do this and i tried looking at how an sql search works but really i have no idea.

 

here is my code

<?php if ($the_product_info['products_model'] LIKE CONVERT('%(g)') {  echo 'It works!!!');
	?>

 

any help would be great

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/125452-solved-whats-the-code-for-contains/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.