@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18



Comments:

<0> ok i changed the encryption to MD5, i hope that makes you happy will[werk] :-D
<1> 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
<1> 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
<1> yo know what? Just ignore me, I'll just test it
<1> I'm just wondering if doing a LEFT JOIN .. WHERE x IS NULL is any slower than an INNER JOIN
<2> CAN I do something like a "SHOW CREATE TABLE" on a temporary table?
<3> schnazz: tias?
<4> I'm having the problem where phpmyadmin won't let me login, but I can log into mysql from the command line just fine.
<4> Can someone point me in the right direction? I haven't been able to find much on it so far.
<5> what error do you get from phpmyadmin?
<4> when I type in my user name and p***word, it just won't let me login
<5> it should give some sort of error
<4> I'll get a "wrong username/p***word. Access Denied" if I hit cancel
<4> but otherwise, it just resets the login prompt
<2> infi: tias?
<6> AwOL: perhaps you have a problem with the php session, not with mysql at all?



<4> perhaps
<4> 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
<7> Hey all.
<7> I did a - GRANT ALL PRIVILEGES ON '*.*' to 'dbuser'@'%' IDENTIFIED BY 'p***word' WITH GRANT OPTION;
<7> However, now that I try to log in as that user, it fails.
<7> Is there a reason that '%' does not allow localhost?
<8> 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?
<9> added in 4.1
<8> Hm. I wonder why it just worked, then, on what I thought was a 4.0 system...
<8> Because it's not, it's a 4.1 system. Thanks, lsmith! :-)
<7> What do I have to set 'Host' to in the mysql user table, to get mysqld to respond to connections from any host?
<7> I got the idea it was '%' from the documentation, but that does not seem to work...
<10> Hi, is Arjen around?
<11> Not according to the channel list.
<12> hi there
<12> having some problems with some queries
<12> if I have a accounting table
<12> with some values and a lot of dates
<12> how do I do a query to find out how may users connected per month and per day?
<12> unique users or not
<3> not enough information
<12> infi: its an accounting table, each row corresponds to a certain hotspot, certai user, XX time
<12> I need to feed my graph cl*** with values
<3> please paste the output of "DESC yourtable;" and a description of exactly what you want to the Pastebin: mentioned in the topic.
<12> like month 2-> 300 access, month 3 ...
<12> ok
<12> one sec
<3> (http://hashmysql.org/paste/)
<12> infi: http://hashmysql.org/paste/viewentry.php?id=1846
<12> infi: now I would like a table like, month, users -> 1, 120 | 2, 200...
<3> aiee
<12> infi: I did a mistake
<12> wrong table
<12> one sec
<3> I thought so
<12> infi: here it is http://hashmysql.org/paste/viewentry.php?id=1847
<12> my main is problem
<12> if I got a month without no users or accesses
<12> it should appear in the table with a 0
<12> the same for the daily graph
<3> erm
<12> infi: but I don't know how to do it in sql
<3> yeah, this table structure doesn't lend itself well to that kind of accounting
<3> sec
<13> What's the apt-get command to install MySQL Server 5.0 ?
<12> jbrimble: what version?
<3> Epilog: can you paste the output of "SHOW CREATE TABLE radacct;" so that I can create a test table?
<3> !m infi date and time
<14> infi: (Date and Time Types) : http://dev.mysql.com/doc/mysql/en/Date_and_time_types.html
<12> jbrimble: apt-caache search mysql server and apt-get install mysql-server or mysql-server-4.1
<3> !m infi date and time functions
<14> infi: (Date and Time Functions) : http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html
<12> infi: http://hashmysql.org/paste/viewentry.php?id=1848
<3> thanks
<12> infi: I did something with SUM (IF) some days ago but not related to this
<3> I ***ume you're basing the month off of the AcctStartTime and AcctEndTime columns?
<3> er, AcctStopTime
<12> infi: only the AcctStartTime matters
<3> yeah, I was going to suggest that.
<15> hm.. i was wondering if FIRST(col) was implemented in MySQL... atleast it doesnt work and it aint documented... -- is there a workaround?



<12> infi: I only need to know how many accesses I had for each month and then for each day for a given month
<3> one thing at a time :)
<12> infi: :D
<16> Epilog: Do you really need it in tabular for, where the monthly values are by column, Jan, Feb, Mar, etc?
<16> s/for/form
<12> Xgc: each row, one month
<3> EpiLog: select RadAcctId,COUNT(*) from radacct group by MONTH(AcctStartTime);
<16> Epilog: Otherwise, you can get the result simply by JOINing a derived table of months with your data.
<3> see what you think of that output.
<16> infi: Right, but he won't get the 0 months that way, if there are no corresponding rows..
<3> ah, yeah.
<16> That's where the LEFT JOIN of a list of months is useful.
<12> Xgc: Yep, now I only need to get the months with 0 access in there
<12> and a left column with the month number
<13> 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?
<12> jbrimble: add a testing or unstable line
<12> jbrimble: SELECT MONTH(AcctStartTime), COUNT(*) FROM radacct GROUP BY MONTH(AcctStartTime);
<16> Epilog: SELECT v1.month, aggregate(...) FROM (derived table of months) v1 LEFT JOIN (your data/tables) v2 ON v1.month=v2.month ... GROUP BY ...;
<12> Xgc: SELECT MONTH(AcctStartTime), COUNT(*) FROM radacct GROUP BY MONTH(AcctStartTime);
<12> Xgc: can I create a temporary table with 1 to 12?
<12> on the fly?
<16> Sure.
<16> Epilog: http://hashmysql.org/paste/viewentry.php?id=114
<16> Epilog: 1 to 12 is a simplified version of that.
<16> Lots of ways to solve this one.
<3> ooh, nice.
<12> 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;
<16> Epilog: Forgot the ORDER BY until the outer-most SELECT.
<16> Forget, that is.
<12> Xgc: You're right
<12> gonna do some copy paste
<16> 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.
<12> Xgc: that's what I'm doing
<12> 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)
<12> Xgc: something wrong here
<16> RIGHT JOIN
<16> Epilog: You have the tables reversed.
<12> ?
<16> FROM (derived months) v1 LEFT JOIN (your query) v2 ON ...;
<16> With your ordering of tables, you need a RIGHT JOIN.
<12> ah ok
<16> I'd functionally design the query so that your initial solution was untouched in a derived table.
<12> let me test
<17> 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.
<16> Everyone has a JVM. Use JDBC.
<16> C/C++ is just painful, but workable if you have the basic kinks worked out.
<18> 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)
<18> and the table has 10k rows+
<17> Xgc: I really prefer C++ and everything else is already done with that..
<16> JowWSmith: Try it. For very large sets, I suspect the 1st is better.
<16> Spanska: That's fine. The API comes with a test app / test source, doesn't it?
<17> hrm.. I wasn't aware of that if it's the case
<16> Hmmm... I think the mysql distribution probably has a test directory.
<18> Xgc: have a ****y shared server, i run the same query and get diferent times alwais :p thats's why i ask
<16> Spanska: Try the examples directory.
<16> JowWSmith: You can always install locally to run some tests.
<17> fine, thank you ;)
<12> Xgc: can't get it to wokr
<16> Epilog: Post your initial solution without the extra month join. Place that in the pastebin and I'll adjust it.
<12> Xgc: one sec
<12> Xgc: http://hashmysql.org/paste/viewentry.php?id=1849
<12> since there is a LAST_DAY func is there a FIRST_DAY func or a work around?
<16> Epilog: Isn;t the first day always 1 or 0, depending on whether you count from 0 or 1?
<12> 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
<12> for instance, I want to get the months and them the days so I would like to p*** the days interval
<12> or
<12> its just comming to me
<16> Epilog: You might be better off adding 1 to the month and using the first day of that month.
<12> I could do a WHERE MONTH(aa) = 2
<12> Xgc: any progress?
<16> Epilog: http://hashmysql.org/paste/viewentry.php?id=1850
<12> Xgc: works like a charm
<12> thank you very much


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






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



Home  |  disclaimer  |  contact  |  submit quotes