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’ ?
Not with a single SQL query, no.
But you could perform those actions, using separate SQL queries, within a single stored procedure. This would be faster than submitting three queries separately from your application, because there’s no time/performance lost transferring data back and forth over the wire (to and from your application code).