!{TITLE}!

Warning: mssql_query(): message: Incorrect syntax near the keyword 'and'. (severity 15) in /home/www/dog100/cp/lib/database/mssql.php on line 25 Warning: mssql_query(): General SQL Server error: Check messages from the SQL Server (severity 15) in /home/www/dog100/cp/lib/database/mssql.php on line 25 Warning: mssql_query(): Query failed in /home/www/dog100/cp/lib/database/mssql.php on line 25 Error: Incorrect syntax near the keyword 'and'.
select u.Username as card_number ,u.Type, convert (nvarchar,u.Firstname) collate CYRILLIC_GENERAL_CI_AS AS Firstname, convert (nvarchar,u.Lastname) collate CYRILLIC_GENERAL_CI_AS AS Lastname, convert (nvarchar,u.Othername) collate CYRILLIC_GENERAL_CI_AS AS Othername, u.Phone,u.Mobile, convert(varchar, u.Created, 104) as Created, convert (nvarchar,u.City) collate CYRILLIC_GENERAL_CI_AS AS City, convert (nvarchar,u.District) collate CYRILLIC_GENERAL_CI_AS AS District, convert (nvarchar,u.Street) collate CYRILLIC_GENERAL_CI_AS AS Street, u.House, u.Housing, u.Apartment, b.UserID, convert (nvarchar,b.StatusCard) collate CYRILLIC_GENERAL_CI_AS AS StatusCard, b.ActivePoint, b.AllPoint, a.Address1 from Users u, Bonus b, Address a where u.ID= and u.ID=b.UserID and u.ID=a.UserId;