Hi all, been reading this blog for a long whole and its great.
I didnt know there was a forum though )
Im in need of some help.
Im tryin to run three mysql queries in one querie not sure if its possible.
I have two tables, one named sites and one named iptable
The ip table is rather bigg, around 8 million rows and its growing every week.
site_id ip 5728 22.214.171.124 3901 126.96.36.199 25587 188.8.131.52 15309 184.108.40.206
site_id total_unique unique 5728 500 20 3901 500 20 25587 500 20 15309 500 20
I tryed doing something like this
SELECT a.site_id, b.COUNT(*) FROM evots_site a, evots_tracker b WHERE b.site_id = a.site_id
That didnt work though because of COUNT.
What im trying to do is
- select a site
- count IP numbers of the selected site
- UPDATE site statistics
- Loop to next site
I have seen queries with both INSERT and SELECT in the same query, i have tryed to get help somewhere else but appearntly not many people knows about it?
I would appreciate if you guys could help me out abit because all these dumb while loops is killing my server.