The mysql extension is deprecated and will be removed in the future: use mysqli or pdo instead

     

$connection = Mage::getSingleton("core/resource")->getConnection("core_read");$sql = "Select * from catalog_product_flat_1";$rows = $connection->fetchAll($sql); //fetchRow($sql), fetchOne($sql),...Zend_Debug::dump($rows);For core_write use below code

$resource = Mage::getSingleton("core/resource");$writeConnection = $resource->getConnection("core_write");$table = $resource->getTableName("catalog/product");$query = "UPDATE $table SET item = "value" WHERE entity_id = "value"";$writeConnection->query($query);`


Bạn đang xem: The mysql extension is deprecated and will be removed in the future: use mysqli or pdo instead


*

Don"t use mysql, mysqli or even PDO in Magenlớn code.

If this is the jdomain.vn lớn database, use the existing connection from jdomain.vn

$connection = Mage::getSingleton("core/resource")->getConnection("core_read");See also: https://stackoverflow.com/questions/11792762/how-to-do-custom-query-in-jdomain.vn

If it is a different database, you still can use the Magenlớn methods, but need khổng lồ define an additional connection as explained here: how lớn connect another database from jdomain.vn


*




Xem thêm: Đăng Ký Hosting Miễn Phí Tốt Nhất Hiện Nay, Đã Test, 16 Web Hosting Miễn Phí (2021) Để Xem Xét

Thanks for contributing an answer khổng lồ jdomain.vn Staông chồng Exchange!

Please be sure to answer the question. Provide details and giới thiệu your research!

But avoid

Asking for help, clarification, or responding to lớn other answers.Making statements based on opinion; baông xã them up with references or personal experience.

To learn more, see our tips on writing great answers.


Post Your Answer Discard

By clicking “Post Your Answer”, you agree khổng lồ our terms of service, privacy policy & cookie policy


Not the answer you're looking for? Browse other questions tagged jdomain.vn-1.9 jdomain.vn-1.7 jdomain.vn-1.8 database sql or ask your own question.


Magenlớn PHP Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
*

site design / logo © 2021 Stachồng Exchange Inc; user contributions licensed under cc by-sa. rev2021.7.30.39889


Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device & discthua information in accordance with our Cookie Policy.


Chuyên mục: Domain Hosting