Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs
In directory usw-pr-cvs1:/tmp/cvs-serv4944/chat/lib/index_libs
Modified Files:
main_index.lib.php3 do_enter_db_work.lib.php3
Log Message:
For Tinou: improved messages tables (lower database soft. charge)
Index: main_index.lib.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/main_index.lib.php3,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -r1.41 -r1.42
*** main_index.lib.php3 2001/11/26 20:23:13 1.41
--- main_index.lib.php3 2001/11/29 22:00:56 1.42
***************
*** 989,993 ****
echo("\n");
! $dbLink->query("SELECT DISTINCT msg.room FROM " . C_MSG_TBL . " msg, " . C_ROOM_TBL . " rm WHERE msg.m_time > 0 AND msg.username NOT LIKE 'SYS %' AND (msg.room = rm.room_name AND rm.room_type = 1) ORDER BY room");
while (list($room) = $dbLink->nextRecord())
{
--- 989,993 ----
echo("\n");
! $dbLink->query("SELECT DISTINCT msg.room FROM " . C_MSG_TBL . " msg, " . C_ROOM_TBL . " rm WHERE msg.username NOT LIKE 'SYS %' AND (msg.room = rm.room_name AND rm.room_type = 1) ORDER BY room");
while (list($room) = $dbLink->nextRecord())
{
Index: do_enter_db_work.lib.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/do_enter_db_work.lib.php3,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** do_enter_db_work.lib.php3 2001/11/26 22:16:08 1.25
--- do_enter_db_work.lib.php3 2001/11/29 22:00:56 1.26
***************
*** 158,162 ****
// if m_time and rooms aren't null to enforce the use of existing
// indexes)
! $dbLink->query("DELETE FROM " . C_MSG_TBL . " WHERE m_id > 0 AND room > '' AND address = '$slashedNick' AND username = 'SYS welcome'");
$aQuery = 'INSERT INTO ' . C_MSG_TBL . ' '
. '(room, username, m_time, address, color, msg_original, msg_enhanced) '
--- 158,162 ----
// if m_time and rooms aren't null to enforce the use of existing
// indexes)
! $dbLink->query("DELETE FROM " . C_MSG_TBL . " WHERE address = '$slashedNick' AND username = 'SYS welcome'");
$aQuery = 'INSERT INTO ' . C_MSG_TBL . ' '
. '(room, username, m_time, address, color, msg_original, msg_enhanced) '
***************
*** 201,205 ****
// Deletes the old welcome messages sent to the current user (check if
// m_time and rooms aren't null to enforce the use of existing indexes)
! $dbLink->query("DELETE FROM " . C_MSG_TBL . " WHERE m_id > 0 AND room > '' AND address = '$slashedNick' AND username = 'SYS welcome'");
$aQuery = 'INSERT INTO ' . C_MSG_TBL . ' '
. '(room, username, m_time, address, color, msg_original, msg_enhanced) '
--- 201,205 ----
// Deletes the old welcome messages sent to the current user (check if
// m_time and rooms aren't null to enforce the use of existing indexes)
! $dbLink->query("DELETE FROM " . C_MSG_TBL . " WHERE address = '$slashedNick' AND username = 'SYS welcome'");
$aQuery = 'INSERT INTO ' . C_MSG_TBL . ' '
. '(room, username, m_time, address, color, msg_original, msg_enhanced) '
***************
*** 264,268 ****
* enforce the use of existing indexes)
*/
! $dbLink->query("DELETE FROM " . C_MSG_TBL . " WHERE m_id > 0 AND room = '\\\*\\\' AND address = '$slashedNick' AND username = 'SYS inviteTo'");
?>
--- 264,268 ----
* enforce the use of existing indexes)
*/
! $dbLink->query("DELETE FROM " . C_MSG_TBL . " WHERE room = '\\\*\\\' AND address = '$slashedNick' AND username = 'SYS inviteTo'");
?>
|