[TYPO3] MySQL question
Andreas Jonderko
anj2j at yahoo.de
Tue Sep 12 12:57:09 CEST 2006
Hi!
function update_feusers()
{
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'usergroup', // SELECT ...
'fe_users', // FROM ...
"uid='$this->userID' ", // WHERE...
'', // GROUP BY...
'', // ORDER BY...
'' // LIMIT to 10 rows, starting with number 5
// (MySQL compat.)
);
$result = (mysql_fetch_array($res));
// here you can split the result just like this:
$usergroups = split(",",$result['usergroup']);
// $updateArray = array('usergroup' => $usergroups);
//$res=$GLOBALS['TYPO3_DB']->exec_UPDATEquery("fe_users","uid='$this->userID'",$updateArray);
}
should work ...
best regards!
Andreas Jonderko
Livius Agrippa wrote:
> Hi,
>
> How is it possible to select the feusers which belongs to one group?
> I want to use this in an extension and as you know the usergroup field
> in the table fe_users is a tinyblob.
> I am not so good with regular expressions.
> It will be nice if a Typo3 function is used. :)
>
> Best regards,
> Livius
More information about the TYPO3-english
mailing list