Fixed issues with SQL statement
Fixed issues with SQL statement

Auto-increment fields can cause an issue under some dialects. With the changes, the auto-increment works fine now.
KellyKP/Secondlife-Merchant-ANS