PDA

View Full Version : new thread sql querie


rob01
11-19-2008, 03:52 AM
hello i was thinking in adding something, so when a Admin, moderator , replies to a thread a small image will appear besides the thread name, saying a moderator has added a new replay

i was thinking something like this:
(when the moderator post)
"UPDATE user SET GM='1' WHERE id='$userid'"

for cheking if the post should add a picture or not
$db->query_read("
SELECT GM
FROM " user "
");

i know is not complete, i will try to finish it tonight

but what you think about the idea?

Lynne
11-19-2008, 04:02 AM
I'm not understanding how you plan to go about this. Any time a mod/admin posts in a thread, GM gets set to 1? How does that identify the thread? Also, the table is 'user', not 'users'. If it's info about a thread, don't you think it would be better to keep the info in the thread table?

rob01
11-19-2008, 04:16 AM
yeah i know, i dint make the exact query since is still not finished, i just wanted to know if quering the databese when the user open a forum section could be a good idea, but it should be querie since the start right?

well this stuff .. could be useful for game forums, where user ask a GM (game masters) about their account getting banned and so on

the queries are not exactly correct , sorry xD if i finish today , i will post it o.o well i will try
xD