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



Comments:

<0> it isnt solveable withoun subquery?
<0> with simple LEFT OUTER JOIN?
<1> MetaMorfoziS: Did you read the entire article?
<2> select name,count(msg) as count from mytable group by name order by count desc limit 10?
<3> so you're logging an IRC channel to a mysql database?
<0> yes
<0> gleam_: ^^ it seems good for me , moment i tryit
<4> I need help with an import problem
<0> gleam_: nice! thank you, very very
<4> I'm typing: "mysqlimport supertux backup.sql" but im getting this error: "Error: Table 'supertux.backup' doesn't exist, when using table: backup"
<2> mysqlimport isn't for sql files
<2> use mysql supertux < backup.sql
<4> oooh
<4> I feel so stupid now
<4> XD
<4> ty for that :p :)



<4> having to move my fansite to another server and causing me lots of problems :p
<4> well only 1 problem left now
<4> :)
<0> can i count words in a string?
<0> or count a string in a string? for me thats enough if i count's the spaces and +1:)
<4> well you "CAN" count them manually
<4> :p
<0> in string-function-s i'm not found any function that can do this
<0> oh! Tuxthepenguin thank you!:)
<5> does anyone know if it's possible to do something similar to seconds_behind_master in mysql 4.0?
<4> nothing beats manually counting
<4> :p
<2> no, your best bet is to see how many bytes behind it is in the binary log roo
<6> what the right datatype to use for boolean
<6> *what is
<0> boolean:D
<4> boolean
<4> ?
<4> :/
<6> there is boolean in mysql?
<0> :\
<0> yes
<4> XD
<2> it's just tinyint
<6> in sql server i believe theres bit for that
<6> ok
<2> well
<2> 5.0 there's bit
<0> oh not
<2> before 5.0 bit is tinyint
<0> DOUBLE
<0> not?
<2> boolean is still tinyint
<0> ok
<0> so can i count words in a string?
<0> or can i count a string in a string?
<2> doubt it
<2> do it in your app
<0> it's heavy
<0> beacuse its in top 10
<2> heh i can think of a dirty way to do it
<2> interested?
<0> zes
<0> yes
<0> :)
<2> select length(col)-length(replace(col,' ',''))
<0> http://dev.mysql.com/doc/refman/5.0/en/string-functions.html
<0> i checked that
<0> hoh
<0> hm
<0> this returns the length of the string
<0> without spaces
<0> not?
<2> whole thing
<2> first returns length of the string
<2> second returns length minus spaces
<2> difference = # of spaces
<0> hm
<0> lol!
<0> :DDDDD
<3> um... forgive the blasphemous idea, but should mysql really be used for text manipulation?



<2> i agree entirely
<2> it's possible this will be faster than doing it in his app
<2> i'd still rather do it in an app
<0> gleam_: it's cool:D you are on the edge:D
<7> when doing a search against a database, how can I return a portion of the results? LIke all modern serach engines show the sentence of the relevant search for the page... how can I do that?
<8> i've accidentally blown my mysql.db table away, could somebody point me in the direction to recreate it, while I can see the fields I don't know what types they should be or what default values they should have (I ***ume 'N')
<2> this test server and test data takes 200msec to return the results of that (the length/lengthreplace thing) for 4000 rows
<2> so my guess is it might be faster to do it in an app
<2> 4000 rows with about 1k of text in each row
<2> spaces: 638168
<2> length: 3807601
<2> across all rows
<2> heh
<9> or with v4 :P
<5> fluxdude_home: your going to need to do a new mysql_create_system_tables
<5> fluxdude_home: your basically going to have to re-create the whole mysql database
<2> isn't it mysql_install_db? :)
<2> or do both exist?
<7> anyone answer for me? :)
<5> gleam_: i actually looked, i have mysql_create_system_tables
<2> weird
<2> i have both
<9> Kaitlyn: well you really need to learn sql for that - have a look at the syntax of the select query
<2> oh i see
<9> i always thought it was mysql_install_db too
<5> gleam_: and, i do not have mysql_install_db
<2> mysql_create_system_tables spits out sql
<7> its match against().. i found out how to get a score rating for it... but thats as far as I could get
<2> and mysql_install_db actually puts the stuff into the datadir
<5> and, this is a package from mysql
<10> How would I do a select where (contact_id = $var AND member_id = $var2) OR (contact_id = $var2 AND member_id = $var)
<2> basically mysql_install_db runs mysql_create_system_tables and puts them in the db
<2> roo
<9> Kaitlyn: the usual technique is to put the table structure and the select that you have now into a pastebin and then post the link here and ask questions about it
<2> check in, uh
<2> scripts/
<2> mysql-5.1.9-beta-linux-i686-glibc23/scripts/mysql_install_db
<9> well ok... most people leave out the table structure bit :P - but it is a whole lot easier to figure out what is going on with that included :P
<10> Would I have to do two selects?
<5> gleam_: ah, in scripts
<5> i was looking in bin
<2> just do exactly what you said zakabog
<2> did ou even try it?
<8> roo9: that ****s, I don't wanna recreate the whole mysql thingy, I just wanna recreate the db table;
<2> mysql_create_system_tables should spit out schema
<2> just use that
<10> Well no because I didn't think that'd work I just came up with what I think it would be but I have no idea how to do a select statement
<5> fluxdude_home: listen to gleam, he is smarter than me
<2> just try it
<10> Hehe k
<2> fluxdude: mysql_create_system_tables test | grep "^ CREATE TABLE db"
<5> that probably won't work so well since the create table statemnt is on multiple lines?
<2> it's just one line
<2> 1577 characters
<2> at least on mine.
<5> yeah
<9> even if it was on multiple lines why would that be an issue ?
<5> 2 seconds after I typed that I was like, i'm probably wrong...
<2> because the grep would only grab the first line
<9> all of my create table statements are on multiple lines
<5> andrewbryson: from what source?
<9> sql does not care about end of line characters - it just treats them as white space
<2> andrew is talking about something else
<9> ah :P
<2> roo's concern was that the grep would only match the very first line of the create table statement
<9> oh right
<2> but since the create table statement is only on one line
<2> it doesn't matter
<5> need to use PCRE :)
<8> thanks for the help gleam_ and roo9, I've found mysql_install_db and read the script, I know how to rebuild this table manually without touching the rest of the database...
<5> np :)
<10> gleam_ mysql isn't giving me any errors with the query but I'm getting no results
<10> SELECT * FROM `contact_list` WHERE ('Contact_ID' = 5 AND 'Member_ID' = 32) OR ('Contact_ID' = 32 AND 'Member_ID' = 5);
<2> '' denotes a string


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

MPLayer emerge wrong skin
gentoo daylight savings
#debian
#lisp
#php
Couldn't run Build.PL: Argument list too long
eth0 does not exist 8139 gentoo
kerb5 deb
#debian
libdl.so.2 fedora fc5 LD_ASSUME_KERNEL



Home  |  disclaimer  |  contact  |  submit quotes