Ironworks Gaming Forum

Ironworks Gaming Forum (http://www.ironworksforum.com/forum/index.php)
-   General Conversation Archives (11/2000 - 01/2005) (http://www.ironworksforum.com/forum/forumdisplay.php?f=28)
-   -   Anyone know much about SQL? (http://www.ironworksforum.com/forum/showthread.php?t=88681)

Memnoch 12-06-2003 09:05 AM

Do you know what this means?


----

SELECT u.username, u.user_id, u.user_sig_bbcode_uid, u.user_sig, pm.*, pmt.privmsgs_bbcode_uid, pmt.privmsgs_text, u2.username AS username2, u2.user_id AS user_id2 FROM phpbb_privmsgs pm, phpbb_privmsgs_text pmt, phpbb_users u, phpbb_users u2 WHERE pm.privmsgs_id = 8104 AND pmt.privmsgs_text_id = pm.privmsgs_id AND pm.privmsgs_to_userid = 5 AND u.user_id = pm.privmsgs_from_userid AND u2.user_id = pm.privmsgs_to_userid

Line : 118
File : /home/roamer/public_html/krforums/mods/prillian/im_read.php

-----

:eek:

Intrepid 12-06-2003 09:36 AM

Quote:

Originally posted by Memnoch:
Do you know what this means?


----

SELECT u.username, u.user_id, u.user_sig_bbcode_uid, u.user_sig, pm.*, pmt.privmsgs_bbcode_uid, pmt.privmsgs_text, u2.username
AS username2, u2.user_id
AS user_id2

FROM phpbb_privmsgs pm, phpbb_privmsgs_text pmt, phpbb_users u, phpbb_users u2

WHERE pm.privmsgs_id = 8104
AND pmt.privmsgs_text_id = pm.privmsgs_id
AND pm.privmsgs_to_userid = 5
AND u.user_id = pm.privmsgs_from_userid
AND u2.user_id = pm.privmsgs_to_userid

Line : 118
File : /home/roamer/public_html/krforums/mods/prillian/im_read.php

-----

:eek:

displays the usernames, member id sig etc
to me it looks like a personal message from memember ID 8104 to member 5
so this SQL should display all PMs between these two members
although I could be wrong

[ 12-06-2003, 09:38 AM: Message edited by: Intrepid ]

Ghoul 12-06-2003 01:23 PM

Quote:

Originally posted by Memnoch:
Do you know what this means?


----
<pre>
SELECT u.username,
u.user_id,
u.user_sig_bbcode_uid,
u.user_sig,
pm.*,
pmt.privmsgs_bbcode_uid,
pmt.privmsgs_text,
u2.username AS username2,
u2.user_id AS user_id2
FROM phpbb_privmsgs pm,
phpbb_privmsgs_text pmt,
phpbb_users u,
phpbb_users u2
WHERE pm.privmsgs_id= 8104
ANDpmt.privmsgs_text_id= pm.privmsgs_id
ANDpm.privmsgs_to_userid = 5
ANDu.user_id= pm.privmsgs_from_userid
ANDu2.user_id= pm.privmsgs_to_userid
</pre>
Line : 118
File : /home/roamer/public_html/krforums/mods/prillian/im_read.php

-----

:eek:

Like Intrepid I think this query shows you all PM between the two users (ID 8104 and ID 5).

Interesting stuff, looks like a join of 3 DB2-tables to me. ;)

[ 12-06-2003, 01:29 PM: Message edited by: Ghoul ]

Memnoch 12-06-2003 01:33 PM

Cool, thanks! [img]smile.gif[/img]

Bungleau 12-06-2003 10:49 PM

It is a query of a database looking for all the private messages from user 8104 to user 5.

Now, the fact that you're seeing this... that's probably not good. If this is in a log, someone may be trying to hack into the database. If it's in a browser display, it may just be a temporary glitch cleared up with a refresh. If it's somewhere else... hard to say.

In most computer environments, the average end user gets no access to SQL or any other DB query tools. The power user may get access to a report writer. The IT department can go wherever they want to... [img]smile.gif[/img]


All times are GMT -4. The time now is 12:38 AM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
©2024 Ironworks Gaming & ©2024 The Great Escape Studios TM - All Rights Reserved