Can I use the Joomla method of retrieving data to populate some dropdown lists I'm using in my forms using database tables located within my Joomla installation?
It seems that using the following statement fails because it can't find the class.
$database =& JFactory::getDBO();
php error: Fatal error: Class 'JFactory' not found
What do I need to include within my chronoform to use the Joomla database methods to access tables to build my form??
Thanks..
It seems that using the following statement fails because it can't find the class.
$database =& JFactory::getDBO();
php error: Fatal error: Class 'JFactory' not found
What do I need to include within my chronoform to use the Joomla database methods to access tables to build my form??
Thanks..
GreyHead,
I tried using the methods, however I'm getting an error about using the methods. Do I need to include something?
$database->setQuery($sql);
$getrows = $database->loadObjectList();
Fatal error: Call to a member function setQuery() on a non-object<br><br>Post edited by: zoom, at: 2007/12/11 17:18
I tried using the methods, however I'm getting an error about using the methods. Do I need to include something?
$database->setQuery($sql);
$getrows = $database->loadObjectList();
Fatal error: Call to a member function setQuery() on a non-object<br><br>Post edited by: zoom, at: 2007/12/11 17:18
Greyhead,
I figured it out. I just needed to include the global var $database and it worked fine. Thanks
I figured it out. I just needed to include the global var $database and it worked fine. Thanks
Hi zoom,
I thought that might do it and was just checking when I saw your post. (Not sure why you need to redeclare as I think you are still in the same function, but if it works that's fine.)
Bob
I thought that might do it and was just checking when I saw your post. (Not sure why you need to redeclare as I think you are still in the same function, but if it works that's fine.)
Bob
I think I am having the same problem. How did you include that variable?
This is not working for me...
global $database;
This is not working for me...
Hi Ricardo,
I think this has been solved at the other thread ?
Max
I think this has been solved at the other thread ?
Max
This topic is locked and no more replies can be posted.