Roly 0 Report post Posted January 29, 2005 I know this isn't the SQL forum but MySQL is used in PHP. I get an error Query: SELECT COUNT(users.*), COUNT(guests.*) FROM users INNER JOIN guests ON users.code != '' AND users.last_active >= 1106971028 AND guests.time >= 1106971028 AND users.last_ip != guests.ip Error#1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '*), COUNT(guests.*) FROM users INNER JOIN guests ON users.code Share this post Link to post Share on other sites
OpaQue 15 Report post Posted January 29, 2005 SELECT COUNT(users.*), COUNT(guests.*)FROM users INNER JOIN guestsON (users.code != '' AND users.last_active >= 1106971028AND guests.time >= 1106971028AND users.last_ip != guests.ip)OR If you have missed the WHERE clause it will be something like this,SELECT COUNT(users.*), COUNT(guests.*)FROM users INNER JOIN guestsON (users.code != '' ) WHERE users.last_active >= 1106971028AND guests.time >= 1106971028AND users.last_ip != guests.ip Share this post Link to post Share on other sites