SQL Query

Re: SQL Query

by Luis de Vasconcelos -
Number of replies: 0
I would rather select from the prefix_user table and join on the prefix_user_info_data since the prefix_user table is the main user table and prefix_user_info_data can have more than one related row for each row in prefix_user.:

SELECT FROM_UNIXTIME(c.timecreated), b.firstname, b.lastname, b.icq, a.data, c.action
FROM prefix_user b ON a.id=b.id
LEFT JOIN prefix_user_info_data a

JOIN prefix_logstore_standard_log c ON c.userid=b.id
WHERE (c.eventname= '\\core\\event\\user_loggedin' OR c.eventname= '\\core\\event\\user_loggedout')
AND b.icq = 'CREOLA400H'