scott.timlock
-
Posts
4 -
Joined
-
Last visited
Posts posted by scott.timlock
-
-
Column 'SRO_VT_LOG.dbo._LogEventChar.CharID' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. SELECT s.CharID, MAX(s.EventTime) as lastLogout
-
Hello, I have recieved some decent assistant from these forums before, so I am back.
I have this query...
SELECT l.EventTime, c.CharName16, c.CurLevel, g.ID, g.Name FROM [sRO_VT_LOG].[dbo].[_LogEventChar] AS l, [sRO_VT_SHARD].[dbo].[_Char] AS c, [sRO_VT_SHARD].[dbo].[_Guild] AS g WHERE c.CharID = l.CharID AND g.ID = c.GuildID AND l.EventID = 4 AND l.EventTime > (SELECT TOP 1 s.EventTime FROM [sRO_VT_LOG].[dbo].[_LogEventChar] AS s WHERE s.CharID = l.CharID AND s.EventID = 6 ORDER BY s.EventTime DESC) ORDER BY l.EventTime DESC
here is an example from the log table
CharID EventTime EventID Data1 Data2 Data3 8572 2012-09-13 13:43:40.757 4 0 1583623721 NULL NULL 8572 2012-09-13 13:44:19.570 6 0 1583623721 NULL NULL
Which, while referencing other tables for name data, gives me a list of users currently online... however I cannot for the life of me solve the issue of the query not displaying users who are online but for the first time, never creating the logout row (id 6).
Also, Im looking for a seperate query for finding the total time a user has been online by subtracting the login times from the logout times, but I dont know where to start. I know its possible, maybe not exactly how I think it is, and thats the other half of the reason i am here.
-
$sql = "SELECT invoice_id, vehicle_id, type, date FROM invoice_haul WHERE date > ".$time; if ( !($result = $db->sql_query($sql)) ) { die('Error in obtaining haul data'); } while($haul = $db->sql_fetchrow($result)) { $row[] = $haul; }
I cannot for the life of me figure out how to sort $row by the key $row[]['date'].... i know i can just ORDER BY the sql query but there are other queries that add to $row and i need to sort by the date after the fact.
Help in registration security.
in PHP Coding Help
Posted
Hello, I have this registration script in php... and was recently compromised. I was hoping for some help in identifying any potential security issues that would allow a person to get userid, email, and password hash's from it.