David, > If I change the code to ($nrows = 1) then it displays 'Data found', > however if I have a REC_VALUE = 'does not exist' it still displays 'Data > found'.... > That would suggest that something is being returned - do you have command line access or some other way to look at what is being returned by the sql statement? Peel back the layers... raz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php