SQL query to count rows of a table // R33
#1

Hello,
I'm making a MyBB forum integeration for my gameserver so when people register on it the same thing will apply to forums ( so they will have access to forum too, automatically )
well i disabled registration and i made some edits to my code and i got errors on this:
PHP код:
stock CheckMybbUsers()
{
    new 
query[1000];
    
format(querysizeof(query), "SELECT * FROM `mybb_users`");
    new 
Cachestringresult mysql_query(SQLquery);
    
cache_num_rows() = mybb_users;
    
cache_delete(stringresult);
    return 
1;

I'm using it to add +1 in UID ( user id ) for each registration...
errors are :
Код:
error 022: must be lvalue (non-constant)
warning 215: expression has no effect
in the check_num_rows line. can you help me with an alternative thing? or just by fixing errors on that?
P.s.: i tried cache_get_row_count() and got same error.
Reply


Messages In This Thread
SQL query to count rows of a table // R33 - by YouHack - 12.04.2017, 22:00
Re: SQL query to count rows of a table // R33 - by GangstaSunny. - 12.04.2017, 22:37
Re: SQL query to count rows of a table // R33 - by Vince - 13.04.2017, 05:35
Re: SQL query to count rows of a table // R33 - by YouHack - 13.04.2017, 10:47
Re: SQL query to count rows of a table // R33 - by YouHack - 13.04.2017, 11:08

Forum Jump:


Users browsing this thread: 1 Guest(s)