I am trying to add a WHERE statement in a simple query in Joomla 3.0.3. but the code only works when I comment the line with the WHERE statement. Do you have any suggestion? Many thanks!
<?php
$query = $db->getQuery(true);
$query->select(array('Name','InstrumentFamily'));
$query->from('instrumenttype');
$query->where($db->nameQuote('InstrumentFamily').'='.$db->quote('debt'));
$db->setQuery($query);
$result = $db->loadAssocList();
print_r($result);
?>
PS: note that I'm using the Sourcerer extension to type such statements in the back end of Joomla!