i wrote this sql query as a test and i get syntax error.
the error cuased In the bold line
i'm using joomla 1.7 ' cb 1.7 my sql 5.0
the query chak the current session id with all the session id and bring back the user id that open the current session
$query1 = "SELECT b.userid "
."\n FROM #__session AS b, #__session AS s"
."\n WHERE (b.session_id)= " .session_id(). " AND (b.guest=0) AND" . ( ( checkJversion() >= 1 ) ? "(b.client_id = 0)" : "(NOT ( b.usertype is NULL OR b.usertype = ''))" ); $_CB_database->setQuery($query1);
$rows1 = $_CB_database->loadObjectList();