Hi, thanks for your help. Basically i’m integrating a payment system (barclycard edpq) into a website. I have to update the db based on the transaction status that they return. Unhelpfully, barclycard return a string rather than an interger to do this. As part of the exception handling in the script, (for instance the buyer may click the back button and the order fulfilment script might try and add the transaction status again) I basically just need to check to see if the transaction status already exists so i can decide whether it needs inserting or not.