Greetings.
I'm storing all the session_id's of my users in a table on a database.
Now I'd like to a PHP script wich is run by cron to destroy session's by a timeout (30 minutes).
So I came up with this:
$qry = "
SELECT
SESSION_ID
FROM
SESSION_ACTIVITY
WHERE
DT = current_date AND
HR <= current_time - interval '30 minutes'
";
$recordSet = $myDB->Execute($qry);
while (!$recordSet->EOF)
{
$ksid = $recordSet->fields('SESSION_ID');
// Here is the missing part
// Then I'll delete the row from the db
}
In the "Here is the missing part", I'd like to destroy the specific session (identified by the $ksid variable).
But as I saw on PHP docs, session_destroy doesn't accept parameters, so the logical:
session_destroy($ksid);
won't work, right?
So, how can I do this? Please help!
TIA,