Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

update having mysql

UPDATE contacts_domains cd, 
 (SELECT id FROM contacts_domains GROUP BY domain_id
   HAVING COUNT(contact_id) = 1) AS cdtmp
SET cd.dominant = 1
WHERE cd.id = cdtmp.id
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #update #mysql
ADD COMMENT
Topic
Name
6+7 =