SELECT Count(*)
FROM tbl_sample
WHERE name = 'srinu'
GROUP BY name
HAVING Count(name) = 1
By using the above query you will get only one row from the table.
use this and write code to display the popup message if there is no row coming from the database.