Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands
In directory usw-pr-cvs1:/tmp/cvs-serv4944/chat/lib/commands
Modified Files:
save.cmd.php3 join.cmd.php3
Log Message:
For Tinou: improved messages tables (lower database soft. charge)
Index: save.cmd.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands/save.cmd.php3,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** save.cmd.php3 2001/11/26 20:22:16 1.7
--- save.cmd.php3 2001/11/29 22:00:56 1.8
***************
*** 54,58 ****
$getMessagesQuery = 'SELECT COUNT(*) FROM ' . C_MSG_TBL . ' '
. 'WHERE '
- . "m_id > 0 AND "
. "room IN ('$slashedCurrentRoomName', '\\\*\\\') AND "
. '('
--- 54,57 ----
Index: join.cmd.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands/join.cmd.php3,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** join.cmd.php3 2001/11/26 20:22:15 1.12
--- join.cmd.php3 2001/11/29 22:00:56 1.13
***************
*** 219,223 ****
// m_time and rooms aren't null to enforce the use of existing indexes)
$queries[] = 'DELETE FROM ' . C_MSG_TBL . ' '
! . "WHERE m_id > 0 AND room > '' AND address = '$slashedNick' AND username = 'SYS welcome'";
$queries[] = 'INSERT INTO ' . C_MSG_TBL . ' '
. '(room, username, m_time, address, color, msg_original, msg_enhanced) '
--- 219,223 ----
// m_time and rooms aren't null to enforce the use of existing indexes)
$queries[] = 'DELETE FROM ' . C_MSG_TBL . ' '
! . "WHERE address = '$slashedNick' AND username = 'SYS welcome'";
$queries[] = 'INSERT INTO ' . C_MSG_TBL . ' '
. '(room, username, m_time, address, color, msg_original, msg_enhanced) '
***************
*** 233,237 ****
// Delete invitations sent to the current user (check if m_time isn'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 inviteTo'");
// 2. Rooms table
--- 233,237 ----
// Delete invitations sent to the current user (check if m_time isn't null
// to enforce the use of existing indexes)
! $dbLink->query("DELETE FROM " . C_MSG_TBL . " WHERE username = 'SYS inviteTo' AND address = '$slashedNick' AND room = '\\\*\\\'");
// 2. Rooms table
|