Users id Users id
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Users id

Started by dquelhas, September 02, 2006, 08:49:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dquelhas

Hi again,

I'm trying to retrieve the users id in the init.inc.php, but i have no returns.
Can someone help me with this?

Thanks in advance,

Dinis

dquelhas

The query i have done is:

$results = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_USERS']}");
while ($row = mysql_fetch_array($results)) {
    echo $row['user_id'];
}

what is wrong with this?

Thanks in advance,

Dinis

dquelhas

Hello again,

i have tryed again

$results = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_USERS']}");
while ($row = mysql_fetch_array($results)) {
    echo $CONFIG[$row['name']];
}

but no results again. Please help me.

Thanks,

Dinis

Sami

where did you run that code?
and also,
you have a global array for visitor:
USER_NAME has user name
USER_ID has id of user
‍I don't answer to PM with support question
Please post your issue to related board

Joachim Müller

Quote from: bmossavari on September 02, 2006, 09:53:48 PM
you have a global array for visitor:
Actually, those are constants, not arrays.

However, you're suppossed to use those contants as suggested instead of running yet another query.