Query to jos_session fails

Have a programming question regarding your component, plug-in, extension or core hacks? Have an interesting tidbit, FAQ or programming tip you’d like to share? This is the place for you.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Post Reply
sgreen
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Mon Oct 24, 2005 1:36 am

Query to jos_session fails

Post by sgreen » Mon Jan 28, 2008 9:34 pm

Hi,

Given this code:

        $sessionid = session_id();
    echo "\n";
    $database->setQuery("SELECT * FROM #__session WHERE session_id='$sessionid'");
    $sessionvars = $database->loadObjectList;

Does anyone have any idea why this query would fail?  $sessionid has a valid value but $sessionvars always has a count of 0.  Query works fine from the command line, given a valid session value.

Stumped.

StuG

Post Reply