I have the following code:
function isValidAuthor($authorID){
$query = "SELECT * FROM jos_users WHERE id=".$authorID;
...
}
$authorID is an integer, and is called from here:
if(!$this->_helper->isValidAuthor($settings['default_author']))
However, $query always ends up to be SELECT * FROM #__users WHERE id=. I’ve tried casting $authorID to be a string, and have checked$settings['default_author']), and it’s what I want it to be. How can I get the query to use $authorID?
try
echo $authorID;Most likely it’s containing nothing in it….