immigration has the info. Believe me. They know every record of you in Thailand that can connect you to your passport number. The only way they don't is if you haven't had your passport number attached to your police record, been fingerprinted or biometric scanned.
How long have you been in Thailand? Where I live I drink with police. All you need to do is find a friendly young policeman and give him 500 baht to enquire. If it comes back bad, have 20,000 baht ready. Problem solved.