joomla查询语法有什么区别
$db->setQuery //and
$db->getQuery
我到处寻找,但找不到应该在哪里使用哪一个,并且在以下情况下会有所不同:
$db = FabrikWorker::getDbo(false, 2);
$query = $db->getQuery(true); //if I change $query =$db->setQuery(true);
$query = "SELECT sum(r57.`amount`) AS total_fee
FROM `registration` AS r, registration_57_repeat AS r57
WHERE r.id = r57.parent_id
AND r.id = '{registration___id_raw}'";
$db->setQuery($query);
$a = $db->loadResult();
return $a;