Does anyone know the best way to execute SQL queries inside a function call?
I need to query the database get results then process data from query A to build query B. Then once done I will return the results by leaving the function call.
I am not sure of the safest way to query the database that won't break with X-Cart upgrades. I can't find a developer help document at
http://kb.x-cart.com/ explaining the ways on working with database SQL queries in function calls.
Any thoughts?
Thank you!
For example:
Code:
protected function doNoAction()
{
// Execute query A and get results
// Now read queried results and build query B then run that query
return $var1;
}