1. Is there a way by mysql to set ALL product visibility to catalog, search? 批量修改产品可见
open up the eav_attribute table and find the row where attribute_code = visibility . Take note of the attribute_id , most likely it will be 85. Also take note that backend_type = int . This tells you that the attribute is stored in catalog_product_entity_int
update `catalog_product_entity_int` set value = 4 where attribute_id = 85
(assuming of course that the attribute_id was 85!)
Make sure you backup the database before you run it.
2. Is it possible to query the Magento database and display product attributes ? 查询产品信息
What would be a lot easier to do would be to pull in the entire Magento engine into your external page. This [unlike the rest of Magento] is pretty easy to do.
All you have to do is the following:
// Load Up Magento Core define('MAGENTO', realpath('/var/www/magento/'));
require_once(MAGENTO . '/app/Mage.php');
$app = Mage::app();
Now you can use any of the Magento objects/classes as if you were inside of Magento and get your attributes
$product = Mage::getModel('catalog/product')->load(1234);
$product->getSku();
$product->getYourCustomAttribute();
etc etc.