MySQL Query Help

Posted by Andy on Stack Overflow See other posts from Stack Overflow or by Andy
Published on 2010-05-26T06:47:24Z Indexed on 2010/05/26 6:51 UTC
Read the original article Hit count: 318

Filed under:
|
|

I need to find the category id in the products table below. However the cms_ecom_categories.id is wrapped with the & character like &12&. Is there some kind of wild card i could use to wrap around? like %cms_ecom_categories.id% ?

 $sql = "SELECT * FROM cms_ecom_products, cms_ecom_categories 
         WHERE cms_ecom_products.pCategories = cms_ecom_categories.id
               AND cms_ecom_categories.slug = ".$page."";

Thanks to all in advance who can help.

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql