for example i use following command to find a record
SELECT `users`.`mail`
FROM `users`
WHERE `users`.`uid` = %s
if found an match, then i should like to delete this record, and update in the same query an another table. i can solve this with 'joins' ?