@# 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 19 20



Comments:

<0> There's no explicit conversion function that I know of, but it offers if there are illegal characters
<1> It didn't.. Seemed to save it alright.. But there's got to be more than that..
<2>
<0> Xgc: I've read an enourmous amount on SQL over the last couple days (online, Celko's SQL for Dummies, DuBois MySql book), and have learned a lot that I didn't know ... so that's the bright side
<3> peqe_: I'll probably be busy with work. I will likely be around next weekend.
<3> peqe_: It's fun stuff.
<0> Xgc: Great, thanks
<0> mGiff: Try File > Reopen Using Encoding
<1> I'll give that a try..
<4> is insertion like way cheaper than deletion and updating in mysql?
<5> you can do it and benchmark
<6> Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /usr/local/apache2/htdocs/phpBB2/db/mysql4.php on line 48
<6> say's unable to connect to database
<5> !connect
<7> You aren't allowed to do that.



<8> perror 2
<8> !perror 1
<7> System error: 1 = Operation not permitted
<8> !perror 2
<7> System error: 2 = No such file or directory
<5> what was that again
<8> ChronoWiz, way faster
<5> Trixsey, mysqld isn't running
<6> since /tmp/mysql.sock doesnt exist where the hell is it?
<8> mick_linux, it may be running.. just different path for sock
<4> xlx that's what i figured.. there's this huge bottleneck in my program because of it :\
<5> xlx, this question comes up every 10m minutes
<5> usually it just isn't running
<4> it makes sense since you can just bung the new item on the end with insert but with update and delete you have to find it
<5> Trixsey, check the docs
<8> ChronoWiz, 90% of the time.. create new table, insert into new table, selecting positives... rename table production to oldproction, newtable to production;
<8> that works
<8> That's what i do usually
<8> depends on a lot of factors tho
<4> the table has about a million items.. :\
<8> you can try delay key write, you can try numerous things
<8> is it using an index to find the entries ?
<4> no, matching against specific column values
<8> how many rows do you delete tho
<8> is the table optimized
<0> ChronoWiz: You can try PEAR Benchmark_Iterate if you want to test things
<4> optimised? nope.. all my knowledge of sql comes from a book on how to use sql with perl :)
<4> so i am probably doing everything in a totally naive way
<0> Xgc: I'm amazed at the simplicity of your query after the incredibly complex ones I was writing (that didn't work). I see now that my problem was in attacking from the wrong side, the nutr_def side, not the food_des side
<4> what i have written is a search engine for the local smb network
<4> so each file has a set of info about it, such as time last updated and size
<6> mysql is not wanting to set the socket to /tmp/mysql.sock
<0> (I _am_ a little concerned about the cartesian product, since the real database has 136 nutrients, not 3, and thousands of foods ... but a quick test on the real database showed the query to be pretty fast)
<6> i tell it in webmin to but it wont.
<3> peqe_: *nod* It's the right approach.
<6> how do i tell mysql to set the socket to /tmp/mysql.sock ?
<9> Trizmo, there's two places in my.cnf, one for the clients and one for the server
<6> eh "my.cnf" means nothing.. it doesnt even exist
<9> it's in /etc
<6> i have my-huge large medium small, .cnf
<9> those are sample configurations
<0> Trizmo: Copy the appropriate one to my.cnf
<0> Then edit
<6> i wont have any idea which is appropriate
<0> Read the headers to the files
<0> Depends on your hardware
<9> probably small or medium to begin with
<6> alright, i'll try this
<6> Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in /usr/local/apache2/htdocs/phpBB2/db/mysql4.php on line 48
<6> grrr now this
<6> heh
<9> what version of MySQL did you upgrade to?
<6> root@saphyre:/tmp# mysql --version
<6> mysql Ver 14.12 Distrib 5.0.16, for slackware-linux-gnu (i486) using EditLine wrapper
<9> probably time to upgrade php also
<6> 4.4.1 is what version php i have
<9> but inside of it is a very old MySQL client
<6> that i know nothing about :/
<6> client and server socket cant both be /tmp/mysql.sock ?
<9> client and server had better use the same socket file
<9> doesn't work otherwise



<6> thought so
<6> i dont get it :/
<9> don't get what?
<6> the problems i'm having heh :p
<6> i'm going up upgrade mysql
<9> I think 5.0.19 is current
<6> then .16 isnt too far off is it?
<9> not too far out
<6> there shouldnt be any reason this is having a problem
<9> the issue is your php static linked to old mysql client libraries
<6> hmm
<6> i think i can fix it
<6> brb
<10> oh man. whomever added the group_concat() function, i love you
<10> this thing has saved my ***
<9> I've been recommending it to people since I heard about it
<9> useful for presenting normalized data in denormalized fashion
<10> exactly how i'm using it
<10> "show me a report with one line for every customer and everything they've bought"
<9> I found out there's a max return length parameter for it
<10> bummer is it sticks a "," before each, even if i group_concat(column, '\n'), but i can whack that with a regexp at HTML time
<9> there's an option to change the separator
<9> group_concat(fields... separator ' ')
<9> group_concat(fields... separator '\n')
<10> hmm. i'm getting Empty set, 1 warning (1.23 sec).. but no warning
<9> show warnings;
<10> thanks
<10> %d line(s) were cut by GROUP_CONCAT() ?
<10> um, wtf does that mean?
<9> are you up against the max length?
<9> defaults to 1024
<10> oh ****
<9> set group_concat_max_len larger
<10> thanks
<10> hmm. it's fine when run as a regular query, but in a subquery, i get this warning and no output.
<9> likewise hmm
<10> ah i see, the warning is not relevant to why the query returns nothing
<10> indeed, some of these are > 1024, will get rid of that warning, thanks
<10> why i'm getting nothing is likely due to an error in my joins
<11> Hi guys ... how many elements should this request return ... ?
<11> SELECT teachers.name, teachers.month, teachers.monthtime, teachers.location,
<11> school_jobs.school, school_jobs.month, school_jobs.monthtime, school_jobs.city
<11> FROM teachers, school_jobs
<11> WHERE teachers.month=school_jobs.month
<11> AND teachers.monthtime=school_jobs.monthtime
<11> AND teachers.location=school_jobs.city
<11> At the moment it returns only 6 ... ?
<9> and you were expecting?
<11> bobfield: well - I'd been expecting 8 ... ?
<9> I count 8 myself
<11> bobfield: well it returns only six ...
<9> via which client?
<10> ok, i've found the weirdest bug
<11> bobfield: it's a php script
<9> babo, pop it in a pastebin
<10> i have a huge hairy query with a group_concat. if i select group_concat(foo), it works. but if i select group_concat(foo) as some_friendly_name, it shows NUL
<10> ah, wait, my bad. it fails even with the "as"
<10> i should pastebin this. you'll run screaming with fright
<10> here, run screaming with fright: http://pastebin.com/637126
<11> bobfield: http://pastebin.com/637127
<10> oh yay! fixed it! a coalesce!
<10> corrected: http://pastebin.com/63712
<10> i mean, this query is ugly, but it replaces 1000 lines of PHP code
<10> and is like 1000 times faster too!
<9> that's all the reason you need
<9> babo, what kind of database server are you connecting to?
<11> bobfield: mysql 4.1 on windows ...
<10> you know, i've never much liked the SQL language, but now i see the power of it.
<10> for merging huge data sets in a very efficient way, i can't think of a better tool than SQL, really.
<9> babo, sorry I'm not at all familiar with that style of php, I have no clue
<11> bobfield: ok ... no probs ... :-)
<11> bobfield: thanks anyway
<12> babo: i do some php. what are you trying to do?


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

chatserver.py
#perl
gstreamer-properties apt-get
#osdev
FF2 fedora core rpm
quotes phed
#sql
#gentoo
#css
#centos



Home  |  disclaimer  |  contact  |  submit quotes