The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Jumi and Database access
PostPosted: Fri Apr 27, 2012 6:56 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Apr 23, 2012 5:50 pm
Posts: 10
I am going to post this in the Extensions section because i'm not sure what part of Jumi I should be using for my problem. First some Version info....
Joomla! v. 1.5.23
Jumi v. 2.0.6
php v. 5.2.17
phpmyadmin v. 3.4.9
mySQL v 5.5.21
and lastly my server is running LinuxCentOS

My problem is this, I need to get data from the database! seems so simple but I can not get it figured out. It's costing me sleep, stress blah blah blah. If I could just access my database and display one row or element on the screen this would be a great Friday for me. Here is how I have attemted to skin this cat so far....


defined( '_JEXEC' )or die;

$db = JFactory::getDBO();

$query = $db->getQuery(true);

$query = "SELECT * FROM #_jos_events_rec";

$db->setQuery($query);

$rows = $db->loadObjectList();


then some kind of echo for $rows... but that's not my issue I get an error about accessing a jumi file.

Fatal error: Call to a member function getCfg() on a non-object in /home/xxxxxxxxx/public_html/cctv/modules/mod_jumi/tmpl/default.php(12) : eval()'d code on line 6

I have been scouring forums and google for the simple answer to this problem and I find nothing, so I'm turning to the Joomla Community for a kick in the pants in the right direction.


Top
 Profile  
 
PostPosted: Sun Apr 29, 2012 10:47 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Apr 23, 2012 5:50 pm
Posts: 10
I got into the database


Top
 Profile  
 
PostPosted: Fri May 25, 2012 2:34 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Aug 01, 2006 3:17 pm
Posts: 5
I'm having the same issue just today! How exactly did you sort this? IF you don't mind me riding your coat tail!


Top
 Profile  
 
PostPosted: Wed Jun 20, 2012 10:43 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Apr 23, 2012 5:50 pm
Posts: 10
Been three weeks since you posted your question but maybe its not to late I ended up using
Code:
$db =& JFactory::getDBO();
$query = "SELECT summary, contact, description FROM jos_jevents_vevdetail WHERE location = '$yesterday' AND extra_info = '0' ORDER BY  `jos_jevents_vevdetail`.`dtstart` ASC";
$db->setQuery($query);
$rows = $db->loadObjectList();
foreach ($rows as $row)

then I loop through each data element and add it to an array Hope this helps


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 



Who is online

Users browsing this forum: Exabot [Bot] and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group