W
W
web-quest32017-01-09 08:42:01
opencart
web-quest3, 2017-01-09 08:42:01

What is the best way to make requests in opencart?

For example, there is a query like
$this->db->query("UPDATE " . DB_PREFIX . "product SET image = '" . $this->db->escape($data['image']) . "' WHERE product_id = '" . (int)$product_id . "'");
And I want to use normal PDO
Or is it better to do everything as it is done in tsms?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Karavaev, 2017-01-09
@Quieteroks

Naturally, everything is like in the CMS. But take a closer look at the implementation of connecting to the database. If I'm not mistaken, there are several wrappers for connecting to the database, and even PDO was planned. And if so, then you can simply choose the right driver or implement your own without breaking the application and use the functionality you need in your module.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question