| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Comments:
<Ricky28269> ok i changed the encryption to MD5, i hope that makes you happy will[werk] :-D <Jivedue> I realize I could probaby test this, but I'd have to insert a ton of rows, and maybe I can just get a simple answer here, but, say the numbers 1 to 1,000,000 are in table1, then the numbers 1 to 1,000,000 are in either table2 or table3 <Jivedue> and I funked the question up. 1 to 1,000,000 are in table A, then some numbers between 1 to 1,000,000 are in table B, but not all <Jivedue> yo know what? Just ignore me, I'll just test it <Jivedue> I'm just wondering if doing a LEFT JOIN .. WHERE x IS NULL is any slower than an INNER JOIN <shnazz> CAN I do something like a "SHOW CREATE TABLE" on a temporary table? <infi> schnazz: tias? <Aw0L> I'm having the problem where phpmyadmin won't let me login, but I can log into mysql from the command line just fine. <Aw0L> Can someone point me in the right direction? I haven't been able to find much on it so far. <HarrisonF> what error do you get from phpmyadmin? <Aw0L> when I type in my user name and p***word, it just won't let me login <HarrisonF> it should give some sort of error <Aw0L> I'll get a "wrong username/p***word. Access Denied" if I hit cancel <Aw0L> but otherwise, it just resets the login prompt <shnazz> infi: tias? <Duesentrieb> AwOL: perhaps you have a problem with the php session, not with mysql at all? <Aw0L> perhaps <Aw0L> it seems like I upgraded to php5 somewhere along the way, but I don't recall if I started having the problem at that time or not <Martyn> Hey all. <Martyn> I did a - GRANT ALL PRIVILEGES ON '*.*' to 'dbuser'@'%' IDENTIFIED BY 'p***word' WITH GRANT OPTION; <Martyn> However, now that I try to log in as that user, it fails. <Martyn> Is there a reason that '%' does not allow localhost? <Crell42> Hey, folks. Quick memory refresher question. I know older versions of MySQL didn't support sub-selects, but I don't recall when they were added. Was that in 4.0 or 4.1? <lsmith> added in 4.1 <Crell42> Hm. I wonder why it just worked, then, on what I thought was a 4.0 system... <Crell42> Because it's not, it's a 4.1 system. Thanks, lsmith! :-) <Martyn> What do I have to set 'Host' to in the mysql user table, to get mysqld to respond to connections from any host? <Martyn> I got the idea it was '%' from the documentation, but that does not seem to work... <mwright1> Hi, is Arjen around? <mhillyer> Not according to the channel list. <Epilog> hi there <Epilog> having some problems with some queries <Epilog> if I have a accounting table <Epilog> with some values and a lot of dates <Epilog> how do I do a query to find out how may users connected per month and per day? <Epilog> unique users or not <infi> not enough information <Epilog> infi: its an accounting table, each row corresponds to a certain hotspot, certai user, XX time <Epilog> I need to feed my graph cl*** with values <infi> please paste the output of "DESC yourtable;" and a description of exactly what you want to the Pastebin: mentioned in the topic. <Epilog> like month 2-> 300 access, month 3 ... <Epilog> ok <Epilog> one sec <infi> (http://hashmysql.org/paste/) <Epilog> infi: http://hashmysql.org/paste/viewentry.php?id=1846 <Epilog> infi: now I would like a table like, month, users -> 1, 120 | 2, 200... <infi> aiee <Epilog> infi: I did a mistake <Epilog> wrong table <Epilog> one sec <infi> I thought so <Epilog> infi: here it is http://hashmysql.org/paste/viewentry.php?id=1847 <Epilog> my main is problem <Epilog> if I got a month without no users or accesses <Epilog> it should appear in the table with a 0 <Epilog> the same for the daily graph <infi> erm <Epilog> infi: but I don't know how to do it in sql <infi> yeah, this table structure doesn't lend itself well to that kind of accounting <infi> sec <jbrimble> What's the apt-get command to install MySQL Server 5.0 ? <Epilog> jbrimble: what version? <infi> Epilog: can you paste the output of "SHOW CREATE TABLE radacct;" so that I can create a test table? <infi> !m infi date and time <SQL> infi: (Date and Time Types) : http://dev.mysql.com/doc/mysql/en/Date_and_time_types.html <Epilog> jbrimble: apt-caache search mysql server and apt-get install mysql-server or mysql-server-4.1 <infi> !m infi date and time functions <SQL> infi: (Date and Time Functions) : http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html <Epilog> infi: http://hashmysql.org/paste/viewentry.php?id=1848 <infi> thanks <Epilog> infi: I did something with SUM (IF) some days ago but not related to this <infi> I ***ume you're basing the month off of the AcctStartTime and AcctEndTime columns? <infi> er, AcctStopTime <Epilog> infi: only the AcctStartTime matters <infi> yeah, I was going to suggest that. <Amp_God> hm.. i was wondering if FIRST(col) was implemented in MySQL... atleast it doesnt work and it aint documented... -- is there a workaround? <Epilog> infi: I only need to know how many accesses I had for each month and then for each day for a given month <infi> one thing at a time :) <Epilog> infi: :D <Xgc> Epilog: Do you really need it in tabular for, where the monthly values are by column, Jan, Feb, Mar, etc? <Xgc> s/for/form <Epilog> Xgc: each row, one month <infi> EpiLog: select RadAcctId,COUNT(*) from radacct group by MONTH(AcctStartTime); <Xgc> Epilog: Otherwise, you can get the result simply by JOINing a derived table of months with your data. <infi> see what you think of that output. <Xgc> infi: Right, but he won't get the 0 months that way, if there are no corresponding rows.. <infi> ah, yeah. <Xgc> That's where the LEFT JOIN of a list of months is useful. <Epilog> Xgc: Yep, now I only need to get the months with 0 access in there <Epilog> and a left column with the month number <jbrimble> hmm, when i use apt-cache search, It shows an older version of MySQL.. Whats a good place I can add to my sources file? <Epilog> jbrimble: add a testing or unstable line <Epilog> jbrimble: SELECT MONTH(AcctStartTime), COUNT(*) FROM radacct GROUP BY MONTH(AcctStartTime); <Xgc> Epilog: SELECT v1.month, aggregate(...) FROM (derived table of months) v1 LEFT JOIN (your data/tables) v2 ON v1.month=v2.month ... GROUP BY ...; <Epilog> Xgc: SELECT MONTH(AcctStartTime), COUNT(*) FROM radacct GROUP BY MONTH(AcctStartTime); <Epilog> Xgc: can I create a temporary table with 1 to 12? <Epilog> on the fly? <Xgc> Sure. <Xgc> Epilog: http://hashmysql.org/paste/viewentry.php?id=114 <Xgc> Epilog: 1 to 12 is a simplified version of that. <Xgc> Lots of ways to solve this one. <infi> ooh, nice. <Epilog> Xgc: SELECT t1.x num FROM (SELECT 1 x UNION SELECT 2 x UNION SELECT 3 x UNION SELECT 4 x UNION SELECT 5 x UNION SELECT 6 x UNION SELECT 7 x UNION SELECT 8 x UNION SELECT 9 x UNION SELECT 10 x UNION SELECT 11 x UNION SELECT 12) t1 ORDER BY num; <Xgc> Epilog: Forgot the ORDER BY until the outer-most SELECT. <Xgc> Forget, that is. <Epilog> Xgc: You're right <Epilog> gonna do some copy paste <Xgc> Epilog: You can just LEFT JOIN that with your original solution and COALESCE() to return 0 unstead of null for those months with null aggregate sums/counts. <Epilog> Xgc: that's what I'm doing <Epilog> Xgc: SELECT MONTH(AcctStartTime), COUNT(*) FROM radacct LEFT JOIN ((SELECT 1 x UNION SELECT 2 x UNION SELECT 3 x UNION SELECT 4 x UNION SELECT 5 x UNION SELECT 6 x UNION SELECT 7 x UNION SELECT 8 x UNION SELECT 9 x UNION SELECT 10 x UNION SELECT 11 x UNION SELECT 12) t1 ON t1.x = MONTH(AcctStartTime)) GROUP BY MONTH(AcctStartTime) ORDER BY MONTH(AcctStartTime) <Epilog> Xgc: something wrong here <Xgc> RIGHT JOIN <Xgc> Epilog: You have the tables reversed. <Epilog> ? <Xgc> FROM (derived months) v1 LEFT JOIN (your query) v2 ON ...; <Xgc> With your ordering of tables, you need a RIGHT JOIN. <Epilog> ah ok <Xgc> I'd functionally design the query so that your initial solution was untouched in a derived table. <Epilog> let me test <Spanska> Where can I find a good tutorial on how to use the MySQL C++ API in Visual Studio 2003? I don't want to use .NET code because I won't have to install it on each and every workstation. <Xgc> Everyone has a JVM. Use JDBC. <Xgc> C/C++ is just painful, but workable if you have the basic kinks worked out. <JowWSmith> hi, what's faster: "SELECT text FROM table WHERE id > $bla LIMIT 1" or "SELECT test FROM table LIMIT $blabla, 1" (id is an index and primary key) <JowWSmith> and the table has 10k rows+ <Spanska> Xgc: I really prefer C++ and everything else is already done with that.. <Xgc> JowWSmith: Try it. For very large sets, I suspect the 1st is better. <Xgc> Spanska: That's fine. The API comes with a test app / test source, doesn't it? <Spanska> hrm.. I wasn't aware of that if it's the case <Xgc> Hmmm... I think the mysql distribution probably has a test directory. <JowWSmith> Xgc: have a ****y shared server, i run the same query and get diferent times alwais :p thats's why i ask <Xgc> Spanska: Try the examples directory. <Xgc> JowWSmith: You can always install locally to run some tests. <Spanska> fine, thank you ;) <Epilog> Xgc: can't get it to wokr <Xgc> Epilog: Post your initial solution without the extra month join. Place that in the pastebin and I'll adjust it. <Epilog> Xgc: one sec <Epilog> Xgc: http://hashmysql.org/paste/viewentry.php?id=1849 <Epilog> since there is a LAST_DAY func is there a FIRST_DAY func or a work around? <Xgc> Epilog: Isn;t the first day always 1 or 0, depending on whether you count from 0 or 1? <Epilog> Xgc: what I did was something like -- SELECT NOW(), DATE_ADD(LAST_DAY(DATE_ADD(NOW(), INTERVAL -1 MONTH)), INTERVAL 1 DAY) AS First, LAST_DAY(NOW()) AS Last <Epilog> for instance, I want to get the months and them the days so I would like to p*** the days interval <Epilog> or <Epilog> its just comming to me <Xgc> Epilog: You might be better off adding 1 to the month and using the first day of that month. <Epilog> I could do a WHERE MONTH(aa) = 2 <Epilog> Xgc: any progress? <Xgc> Epilog: http://hashmysql.org/paste/viewentry.php?id=1850 <Epilog> Xgc: works like a charm <Epilog> thank you very much
Return to
#mysql or Go to some related
logs:
#fluxbox #osdev intall eclipse + linux mysqli_connect() debian #php gentoo useflags madwifi #math #css easyubuntu +broken filter #physics
|
|