IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1992.93 MB
Powered by
Channel Info
Network: freenodeChannel: #mysql |
Search in www.irclog.org
Log from #mysql at freenode 2006-07-04
[20:30]<kjf2>Xgc: my t2.at_work < DATE_SUB(t1.at_work,INTERVAL 27 DAY) was an attempt at catching those instances which land in the 27 day interval leading up to he t1.at_work date
[20:30]<xra>Kolb: If you can provide the test data, I would probably take a look. I don't usually like to wait for someone else to do the testing and not really know they did what I expected.
[20:31]<kjf2>Xgc: :)
[20:31]<kjf2>Xgc: No problem, and thanks again. How would you like me to give you the test data?
[20:32]<xra>Kolb: mysqldump of the create table and inserts needed for just the required tables.
[20:32]<xra>Kolb: A subset of the data is fine, as long as you can test with it as well.
[20:33]<sullrdrg>archivist: thanks, you've been of great use
[20:33]<sullrdrg>archivist: can you enlight me on the last point ?
[20:34]<kjf2>Xgc: I'll pastie it in a bit, as soon as I figure out "mysqldump" :>
[20:34]<zzaxyvysv>http://php.net/mysql_escape_string
[20:34]<kjf2>syntax
[20:35]<dzzygg_>http://php.net/mysql_real_escape_string
[20:35]<dzzygg_>use that one instead :/
[20:35]<xra>Kolb: mysqldump ... dbname tblname tbl2name ... > outfile.sql
[20:36]<xnfyjsvnax>Darien, ?
[20:36]<kjf2>Xgc: Cool, just a moment.
[20:36]<xnfyjsvnax>Darien_, ? you know how to do that ?> http://rafb.net/paste/results/7kdw1P92.html
[20:36]<xra>Kolb: The ... will be options like -u and -p
[20:38]<kjf2>Xgc: OK, got it. And paste it?
[20:38]<sullrdrg>archivist: no I meant should I use INSERT VALUES or INSERT SET ?
[20:39]<xra>Kolb: Anywhere you wish. Try one of the pastebin, like hashmysql or rafb.net
[20:39]<xra>Kolb: rafb.net might be good, since it allows download.
[20:40]<zzaxyvysv>suppaman, insert values and batch them
[20:41]<sullrdrg>batch ?
[20:42]<kjf2>Xgc: Hm, am getting timeouts. Maybe too big? (10000 rows in set)
[20:42]<kjf2>Xgc: 244 Kb
[20:42]<xra>Kolb: That should be ok. Do you have your own web space you could place it?
[20:42]<sullrdrg>archivist: it seems it's already escaped
[20:43]<kjf2>Xgc: Yes, should have a small patch of grass here somewhere.
[20:43]<sullrdrg>archivist: without mysql_escape_string I get 'test\"\"\"'
[20:44]<sullrdrg>archivist: with mysql_escape I get 'test\\\"\\\"\\\"',
[20:44]<sullrdrg>that's too much escaped I think
[20:47]<kjf2>Xgc: Here we go: http://ez-files.net/download.php?file=45ca2568
[20:58]<sullrdrg>archivist: still there ?
[20:58]<zzaxyvysv>just returned, in/out atm
[21:03]<sullrdrg>archivist: ok, when you can
[21:03]<sullrdrg>archivist: you've got see the history, haven't you ? ?
[21:04]<sullrdrg>I'm out for dinner now and after will start the game
[21:04]<zzaxyvysv>just ask a question and anybody will answer if they can
[21:07]<kjf2>Xgc: Re your "I thought (for a specific day X) that you want to only include those X2's that are between X.date and X.date-27 days": You're absolutely right. I got confused with when we were still counting days off. These are days at work, so I need the n instances where there are > 24 rows with the same employee_id within 27 days leading up to n.date.
[21:08]<aljas>Hi, how can I input data into a table, thats containing tabs (the key) and preserve the tab in an output?
[21:17]<dwdzssvnz>hi all
[21:17]<dwdzssvnz>i have a monster of a table that i want to archive
[21:18]<dwdzssvnz>basically eveything before 1/1/06 i want to copy/move to another table leaving the original table with everything after 1/1/06
[21:18]<dwdzssvnz>what is the best way to do this?
[21:20]<lxl2jv>Man that mxmasster faggot sure says the stupidest shit all the time, like what.
[21:22]<lpyldal>!man insert select
[21:22]<sql>(INSERT ... SELECT Syntax) : http://dev.mysql.com/doc/mysql/en/INSERT_SELECT.html
[21:22]<lpyldal>phpbot, wtf?
[21:23]<lpyldal>!op #mysql
[21:23]<lpyldal>hummm...
[21:23]<lpyldal>SQL no longer has op status
[21:24]<mram>hi, i need help going about this problem
[21:24]<mram>I need data in a table organized alphabetically, yet sometimes the data starts with a quotation mark or an html tag. I need to keep those, but i need them ignored in the search algorithm
[21:27]<kjf2>mxmasster: Something along the lines of SELECT * FROM ... WHERE your time condition INTO OUTFILE filename ?
[21:29]<xra>mxmasster: CREATE TABLE newtbl LIKE oldtbl; INSERT INTO newtbl (...) SELECT ... FROM oldtbl WHERE someDate<'...'; DELETE FROM oldtbl WHERE someDate<'...';
[21:29]<kjf2>Xgc: Thanks for coming to the rescue. :)
[21:29]<xnfyjsvnax>is there a good way to force REPLACE not replacing `id` primary key ?
[21:30]<xnfyjsvnax>in REPLACE INTO `stuff` SELECT *
[21:30]<xra>Heliostech: UPDATE might be the normal way.
[21:30]<xnfyjsvnax>yep but i would like to insert by the way
[21:31]<xnfyjsvnax>http://rafb.net/paste/results/oXkiyS14.html
[21:33]<xnfyjsvnax>Xgc, here what i'm doing now cause i didn't success makin INSERT with DUPLICATE
[21:33]<dwdzssvnz>thanks
[21:34]<kjf2>Xgc: Did you get a chance to look at that outfile?
[21:34]<xra>Kolb: I'm trying now.
[21:34]<kjf2>Xgc: thx
[21:34]<dzrgfj>UPDATE $table SET $varname='$update' WHERE client_id='$client_id' LIMIT $i,1 --- Is giving me an sql error. Can someone help me?
[21:35]<dwdzssvnz>Xgc: that syntax to copy the table give me an error
[21:35]<xra>mxmasster: Show the exact SQL you used.
[21:36]<dwdzssvnz>create table radacct_archive like radacct;
[21:37]<sdnv>anyway to do a select + update in a single statement ?
[21:37]<xra>mxmasster: What version of MySQL are you using? What is the exact error?
[21:38]<sdnv>currently I'm using two queries "select * from records where processed = '0' limit 100", "update records set processed = '1' where processed = '0' limit 100" anyone have any ideas for a more efficent way of doing this ?
[21:38]<dwdzssvnz>ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'like radacct' at line 1
[21:38]<xra>mxmasster: You must be using an old version of MySQL.
[21:38]<sgnzcm_bzsvzzm>pastebin the query please
[21:39]<xra>mxmasster: If so, create the new table in whatever way your old broken version of MySQL permits.
[21:39]<sgnzcm_bzsvzzm>mxmasster: that's kind of the first thing you should do... pastebin the code giving the error
[21:40]<xra>He showed the exact SQL already. It's a simle CREATE TABLE tblname2 LIKE tblname;
[21:40]<lxl2jv>Man that mxmasster faggot sure says the stupidest shit all the time, like ERROR.
[21:40]<xra>simple
[21:40]<xra>!ban phpbot
[21:41]<xra>That'll have to wait. /ignore will have to do.
[21:42]<fusxuyrr>what does 'index' and 'unique' mean? (column properties)
[21:42]<fusxuyrr>what do they do?
[21:44]<xra>Fushuing: unique generally is associated with constraints.
[21:45]<xra>Fushuing: A unique constraint guarantees that no two values in that column or composite set of columns are equal.
[21:46]<xra>Fushuing: You can think of null as an exception to the rule or that two nulls doesn't violate it because null is not equal to null.
[21:50]<rc_pjjeyffr>hello all
[21:51]<fusxuyrr>...
[21:51]<rc_pjjeyffr>what are the minimal mysql permissions required to use mysqldump?
[21:51]<fusxuyrr>then that means this table is not optimized
[21:52]<sdnv>http://hashmysql.org/paste/2116 - could I get a few opinions from some mysql experts ?
[21:52]<fusxuyrr>because there ARE results in the same column with the same value
[21:52]<fusxuyrr>anyhow, would this unique thing have anything to do with performance?
[21:52]<gggdydrgr>Hello, where can I download the source code for Query Browser?
[21:53]<sgnnw>Of what purpose does such a sudoers line provide? ALL ALL=NOPASSWD:/usr/bin/mysql_spasswd
[21:53]<gggdydrgr>It has an error that disturbs me and would like to see if I can correct it myself







