View Single Post
  #5  
Old 05-03-2016, 10:09 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Running Simple Selects on 3rd party table

You can execute raw MySQL queries like this:
Code:
$tablePrefix = \XLite::getInstance()->getOptions(array('database_details', 'table_prefix')); $query = 'UPDATE ' . $tablePrefix . 'orders SET lastVisitDate = 0 WHERE status = "T"'; \XLite\Core\Database::getEM()->getConnection()->executeQuery($query, array());

You should not use this for X-Cart 5 database tables (and use ORM instead), but it is OK to use this for non-X-Cart-5 tables in the same database.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote