| snoyes | xover: 18446744073709551615 |
| niqui | perlmonkey: you want to give all privileges to the user 'admin' who's allowed to connect from anywhere? then use a % for the host part (i.e., 'admin'@'%'). though, are you sure you want to have a user like that out there allowed to connect from anywhere and do anything? |
| EMPER0R | hey in my freeradius db. have many users connecting from many phones.. how can i select the users where connect for >= 3 phones ? |
| jan____ | hey EMPER0R we got your question |
| perlmonkey | niqui: you have a point, it's so I can connect from my workstation or laptop on the local network? is % too much? |
| snoyes | EMPER0R: so, you have a user's table, and a connections table which contains a radacct field, and is that one row in connections per phone? |
| EMPER0R | yes of course |
| niqui | perlmonkey: well, '%' will let the whole internet in if you aren't firewalled, so... :-) |
| EMPER0R | username |
| xover | snoyes: so serial is type bigint |
| perlmonkey | woah |
| EMPER0R | and calling station id |
| cacahuate | M_AxL_M, I'm not too sure what you mean with 'lost data'. Are you wanting to group by col1, but see how many of those have col2= '1'? |
| perlmonkey | localhost is better? |
| niqui | perlmonkey: if you're only connecting from localhost, yeah, just put localhost in. |
| snoyes | SELECT username, COUNT(*) FROM users JOIN connections ON userId = radacct GROUP BY userId HAVING COUNT(*) >= 3; |
| perlmonkey | but wont localhost limit to direct connections on actual server? |
| niqui | perlmonkey: you can always allow more than one host if you need to. |
| snoyes | xover: yes, SERIAL is an alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE. |
| perlmonkey | oh |
| quinten | i'm sorry to ask a basic sql question, but is this possible: select all objects in t1 where a person listed in t3 is a member of a group listed in t2 as having access to t1 |
| snoyes | kyle: http://dev.mysql.com/doc/refman/5.0/en/upgrading-from-4-1.html quinten: SELECT objects FROM t1 JOIN t2 USING (objectId) JOIN t3 USING (groupId) WHERE t3.personId = 42; |
| M_AxL_M | cacahuate: well "lost data" means : exmple : 2 rows with same data except the date data which are different. If I do a "GROUP BY" on the query I could get only one row as a result. So I d have only one date : so I lost data.. Is this clearer ? |
| snoyes | M_AxL_M: So why use the GROUP BY at all then? |
| xover | snoyes: thanks |
| EMPER0R | so ? |
| M_AxL_M | snoyes: Cause I must group some data |
| EMPER0R | i guees with this but only showme theusers SELECT distinct UserName FROM radacct where CallingStationId >= 3 |
| snoyes | EMPER0R: SELECT username, COUNT(*) FROM users JOIN connections ON userId = radacct GROUP BY userId HAVING COUNT(*) >= 3; |
| perlmonkey | does anyone use mysql administrator? im not able to access the control services section :( |
| EMPER0R | uhm let me try |
| Xgc | M_AxL_M: Maybe you mean to use ORDER BY, not GROUP BY. |
| snoyes | EMPER0R: that might need to be COUNT(DISTINCT CallingStationId) instead of COUNT(*) |
| M_AxL_M | Xgc: no .. thanks |
| EMPER0R | snoyes: where? |