|
From: James A. <th...@us...> - 2002-04-30 17:56:54
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv3746/includes
Modified Files:
usercp_register.php
Log Message:
Changed code so it stores total users in config table to remove a slightly costly query
Index: usercp_register.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/usercp_register.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** usercp_register.php 20 Apr 2002 00:22:29 -0000 1.21
--- usercp_register.php 30 Apr 2002 17:56:50 -0000 1.22
***************
*** 518,521 ****
--- 518,530 ----
}
+ $user_update_id = "UPDATE " . CONFIG_TABLE . " SET config_value = $user_id WHERE config_name = 'newest_user_id'";
+ $user_update_name = "UPDATE " . CONFIG_TABLE . " SET config_value = '$username' WHERE config_name = 'newest_username'";
+ $user_update_count = "UPDATE " . CONFIG_TABLE . " SET config_value = " . ($board_config['num_users'] + 1) . " WHERE config_name = 'num_users'";
+
+ if( !$db->sql_query($user_update_id) || !$db->sql_query($user_update_name) || !$db->sql_query($user_update_count) )
+ {
+ message_die(GENERAL_ERROR, 'Could not update user count information!', '', __LINE__, __FILE__);
+ }
+
if ( $coppa )
{
|