I'm selecting an @@identity variable and mssql or php adds several spaces or another unprinted characters to the end. So, I get something like "731 ". MSSQL doesn't want to work with this variable in queries. On other platforms, for example java I didn't meet such problems. So, I think this is a php trouble. Can anybody help?