Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
How can I check if the value exists in catalog_category_product table Magento ?
$_product = Mage::getModel('catalog/product')->load(product_id);
$categoryIds = $_products->getCategoryIds();
echo "value already there!";
echo "value not there!";
Hope this will work for you.
Required, but never shown