Closed (fixed)
Project:
Chatroom
Version:
master
Component:
Code
Priority:
Normal
Category:
Bug report
Reporter:
Created:
26 Jun 2006 at 22:32 UTC
Updated:
1 Jul 2006 at 00:20 UTC
Jump to comment: Most recent, Most recent file
I get the following error on my server:
---
Not unique table/alias: 'chatroom_online_list' query: INSERT INTO chatroom_online_list (ccid, uid, session_id, guest_id, modified) SELECT 1, 1, '332e62acb720d89e2a56ff377dc33d8f', COALESCE(MAX(guest_id) + 1, 1), UNIX_TIMESTAMP() FROM chatroom_online_list WHERE ccid = 1 in /home/virtual/site225/fst/var/www/html/dev.ppacheco.com/includes/database.mysql.inc on line 120.
---
That's because MySQL 3 does not suport updating and querying the same table in a single query, so this one needs to be splitted if you wan't to be compatible with mysql's earlier versions.
cheers
Pacheco
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | chatroom_0.patch | 1.36 KB | pacheco |
| #2 | chatroom.patch | 1.28 KB | pacheco |
Comments
Comment #1
Anonymous (not verified) commentedpacheco is working on a patch for this issue.
Comment #2
pacheco commentedhere it is, please review
Comment #3
Anonymous (not verified) commentedhi pacheco,
thanks for the patch. two little things:
1. i think we should wrap the two queries in db_lock_table('chatroom_online_list') and db_unlock_table('chatroom_online_list')
2. i think the third last line:
should be:
do those changes sound ok to you?
cheers
justin
Comment #4
Anonymous (not verified) commentedComment #5
pacheco commentedsure... we don't need to fetch an array on that :P
table locked too
Comment #6
Anonymous (not verified) commentedthank pacheco,
i'll put this in today.
cheers
justin
Comment #7
Anonymous (not verified) commentedComment #8
Anonymous (not verified) commented