@# 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 21 22 23 24 25



Comments:

<0> dan__t: Use a loop in your script language, use while or foreach if using PHP
<1> anyone have experience with xcart and tuning it's database?
<2> there are some prewritten perl scripts that do a very good job
<2> ability to specify multiple simultaneous connections, etc
<3> benchmark(count, expression) Evaluates expression count times. Always returns zero - the point of this function is to time execution and look at the execution time at the bottom fo the result
<2> expression
<2> not query
<3> I must not recognize the difference
<3> Care to clue me in?
<0> I think thats general script difference
<2> an expression is a small part of a query
<0> Look up what an expression is
<2> "'true' = 'false'" is an expression
<2> datediff(NOW(),NOW() - interval 1 day) is an expression
<3> ok, sorry.
<0> looks like your using perl but php.net has a good explanation of what an expression is



<2> he's talking in the context of mysql
<2> he's talking about mysql's benchmark() function
<0> oh, i've never heard of it, sorry
<3> rad.
<0> is there a linux shell chatroom on this server?
<4> "chatroom" ?
<0> IRC room
<4> you mean "channel" on IRC
<4> try #bash
<0> what would you call SSH and telnet
<4> bash = Bourne-Again SHell
<0> bash or shell?
<4> neither
<0> whats the difference?
<4> I call them remote terminal protocols
<4> remote consoles
<0> wise guy huh?
<4> but if you mean the actual command line
<4> that's usually bash
<0> alrighty
<4> not a "wise guy" at all.
<4> if you don't say what you mean, nobody can help you.
<0> im trying to figure out what im supposed to mean
<4> so, is it the command shell you want help with ?
<4> or getting access to one ?
<0> and im pretty sure you knew i meant the command line
<0> i got my protocol working fine, just i seem to newb out with some of the bash commands
<4> look man, I can just put you on ignore if you keep that up
<5> grml
<4> ok, well #bash is the channel specializing in the shell scripting language
<0> thank yo
<4> at least here on freenode
<0> free node has the best computer related support i've found
<5> this damn print job... i hate design >;/
<5> crap has to be at print @ 8 am...
<4> Clownboy: no disagreement with that
<2> i'm an efnet kind of guy
<2> the abuse is the best part
<0> efnet isn't bad
<2> you have to be ok with the abuse :)
<2> but i've been on efnet for, uh, 13 years
<2> so the abuse is ok.
<0> Ok, mysql question, would you reccomend using backticks or not? to me it helps mysql in the long run, but i've been told not to use them....
<2> i'd advise against it in general, simply because it keeps you from using reserved words
<1> anyone have experience tuning xcart?
<0> (SELECT `col` FROM `table` WHERE 1)
<2> that is, people can go around creating tables named "where" willy nilly if they used backticks, and then user b comes in to try to maintain the code and gets screwed when he doesn't use 'em :)
<1> Clownboy: you will only "need" them when using table names that conflict with reserved words.
<2> column names, db names as well
<0> But does it really hurt to use them?
<1> no.
<2> for the reasons i mentioned, sure :)
<0> Well I rarley code with another person
<2> so?
<2> you might
<2> someone might have to maintain code at some point
<0> and I've got the brain not to use reserve words
<2> then why bother using backticks?
<6> sometimes it causes problem when you upgrade and there are new reserved words that you did not quote previously, so used unlikely reserved words



<2> well yes
<2> although ***orted practices help with that
<0> my brain likes it better, my brain parses(reads) the code better, dunno, just a preference
<2> there are very few reserved words with _s in them and those are pretty easy to predict
<6> try to used identifier that is not likely to become a reserved word
<0> Anyways, backticks are playing it safe right? That's how I play
<1> gleam_: you can get into a situation when you write scripts to deal with table/db names that you didn't control or you wont know what the name will be. It is alot safer to use them.
<0> la
<0> Sorry, meant to type ls in putty, and it came out la in IRC, LOL
<2> i'm not saying you should never use them, i'm just saying you shouldn't use them unless you need to
<2> and you rarely need to
<2> this is all personal preference anyway
<0> And your reasoning for that is that it might encourage me to use reserved words as cols and tables, correct?
<2> and that i don't like the way it looks :)
<0> TodoInT1: Good point
<0> I think it looks better :) So pretty much is boils down to opinion
<2> (cdt)
<0> yeah figured that out arleady
<3> Has anyone written a super duper InnoDB preformance document yet?
<7> evening
<3> hi.
<3> I want to squeeze as much as I can out of this.
<7> is there a way I can get the total number of rows in a database out, and still do a LIMIT x,y ? or do I need 2 queries
<3> SELECT COUNT(*) FROM table WHERE ... ...
<6> TheDeathArt: SQL_CALC_FOUND_ROWS and FOUND_ROWS()
<7> yeah, but dan__t that would only return the rows in the limited result, wouldn't it ?
<7> ahh, SQL_CALC_FOUND_ROWS :) thanks
<3> ahh
<7> lokus do I need both in the query ?
<6> !m TheDeathArt select
<8> TheDeathArt: (SELECT Syntax) : http://dev.mysql.com/doc/mysql/en/SELECT.html
<9> !m random
<8> Incorrect usage. See 'help m'
<7> yeah, im looking at it
<9> Hmm
<7> but can't figure out how to use it, since it returns 0
<7> a sec, and i'll slow the query
<9> Then: does anyone know of a way to return rows in random order?
<6> TheDeathArt: called select found_rows() to get the number
<7> http://phpfi.com/119479
<10> !tell us about random
<8> infi asked me to tell you this: For information on selecting random values see http://jan.kneschke.de/projects/mysql/order-by-rand/
<9> Ah
<7> that current query returns the data correct, but the "totalrows" is 0
<7> confuses me a bit
<11> Anyone know why in phpmyadmin I change a type to char(32) and it says the sql query was exec'd, but it still shows as varchar(32)? http://hashmysql.org/paste/viewentry.php?id=1888
<7> is it not possible to use SQL_CALC_FOUND_ROWS and FOUND_ROWS() in the same query ? currently I can only see the manual does it in 2
<2> no, and who cares?
<2> what's wrong with two queries?
<7> well.. the idea using it was to avoid 2 queries :)
<2> this isn't really two queries
<6> anyway the 2nd query just read the value off a counter
<6> no table access
<2> yeah
<2> doesn't have any impact on anything
<2> kind of like last_insert_id()
<7> mm, but just read it don't work for LIMIT x,y , only for LIMIT x
<6> no reason it won;t work
<7> well, comments says it don't return all rows then
<2> probably returns foundrows-x
<7> http://dev.mysql.com/doc/refman/4.1/en/information-functions.html , 3rd last comment
<2> try it and see
<2> actually it returns same # regardless of limit x,y or limit x
<2> (just tested)
<7> okay
<2> easy enough to test for yourself, of course.
<7> ye doing, except asp.net can't just do a quicky query, hehe
<2> that's what the command line interface is for.
<6> that comment did not use the correct syntax anyway
<2> yeah really
<2> and the comment above it explains that
<6> TheDeathArt: always have mysql CLI for testing purpose
<2> totally.


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

SimpleHTTPServer.test
#ai
earlykdm suse compiz
#linux
tar: Failed to open '/dev/sa0': Operation not supported
#lisp
#perl
wchan write_chan
#lisp
#debian



Home  |  disclaimer  |  contact  |  submit quotes