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



Comments:

<0> if mysqld isn't running, that's the probelm (I was thinking you're having trouble starting it)
<1> need some help plz, i forgot the syntax from a query to get a list from records, that can't be found in another linking-table ( http://81.164.40.97:9080/configurator/join.txt )
<2> inviso: well. im not all impressed..
<3> bricecube:how do i start mysqld.I did this mysqld --skip-grant & but mysqld shupts down
<3> bricecube:how do i start mysqld.I did this mysqld --skip-grant & but mysqld shuts down
<4> --skip-grant-tables
<3> infi:still same problem
<0> abhiubuntu, use a script in /etc/rc.d/ or /etc/init.d
<2> inviso: but it's worth evaluating a bit more anyway.. thanks for the tip!
<0> is this an ubuntu package? I'm sure therre's one in there
<3> bricecube:what should be the script command be to start sqld
<3> bricecube:what should i write in the script
<5> Is there a standard way to set up an arbitrary sort order for a table (so that in the application the user can sort elements easily by clicking up/down buttons, or by dragging/dropping the item to a different place on the list)? I've done this before just by putting a numeric column for sort by, but renumbering all the items when things are moved is a pain.
<5> I suspect others have figured out an easy way to do this.
<0> abhiubuntu, there should be one
<3> bricecube:no there isn't



<3> i will make it myself
<0> abhiubuntu, what happens w/ "mysqld" ?
<3> bricecube:i am sorry there is.thanks man.i will try.
<6> if I have do a mysqldump ... --all-database > all.sql, can I restore a single database from that by doing mysql ... databasename < all.sql or do I have to edit the sql file?
<7> Have to edit the sql file
<6> k. thank you
<8> IdahoEv: use number with big gaps
<8> IdahoEv: ie. rather than 1, 2, 3, 4, 5, do like 1000, 2000, 3000, 4000, 5000
<8> then you can move things into the gap easily
<4> a la BASIC programming!
<6> :/
<6> use a tree structure
<8> RedACE: you can restore a single database from that
<6> HarrisonF, how?
<8> RedACE: check out the --one-database option for the client
<8> mysql --one-database foo < file.sql
<8> will only do foo
<6> hmm, nice! thanks
<5> Harrison: gaps seem like a bit of a hack ... gaps can close, and it's harder to get code to automatically understand them
<5> RedAce: I thought of implementing a doubly linked list via references to the index, but then I couldn't figure out how to select them easily; ORDER BY would no longer work, right?
<8> IdahoEv: not really, to move something between to two items, you just take the average of them
<8> IdahoEv: and if the gaps are big enough, you don't have to worry ;)
<5> Still sounds algorithmically unsafe. One of my clients is an unbelievable micromanager. She will literally spend a day moving things back and forth to fix their sort order... taking the average of values could close any gap in a hurry when you're dividing by 2 in every iteration
<8> use a float ;0
<5> lol
<5> now there's an idea
<8> it also would only happen if you moved it into the same gap, otherwise it would renormalize
<8> ie. if you had 100, 200, 300, 400
<8> and i moved 300 to between 100 and 200, it would then be 100, 150, 200, 400
<0> In my query --> SELECT * FROM subscribers_data WHERE ( ( demographic_id='10' AND value = 'on' ) AND ( demographic_id='4' AND value = ('Peru') ) ); --> I'm hoping to return subscribers who have 'on' for a value where demographic_id is 10, and who have 'Peru' for a value where demographic_id is 4.. however, this is resulting in 0 returned records (even though I have a subscriber who matches both)
<0> I'm using MySQL 3.23
<6> why are you using 3.23?
<6> why are you quoting numbers?
<8> bricecube: how can demographic_id equal two different values? 10 and 4 at once?
<6> why are you (putting (brackets (on (everything))))?
<0> HarrisonF, b/c it's a column
<0> ie. where demogaphic_id is 4 and has value... where demographic_id is 10, and has value
<8> bricecube: yes, that is nice, so tell me how a single column can equal two values, 10 != 4
<6> bricecube, demographic_id IN(4,10)
<0> HarrisonF, it's a unsigned int field??
<8> bricecube: perhaps you mean there are two rows?
<0> HarrisonF, ya.. I'm matching rows..
<6> bricecube, imagine your where statement is picking out 1 row at a time
<6> at each row it asks, are you 4? and are you 10?
<8> bricecube: what is the primary key of the table?
<6> it can't be both
<0> RedACE, my query generator puts those brackets in.. from an oldschool method where demographic_id's were fields .. ie. WHERE (d5 = 'Peru') AND (d3 = 'on') .. etc.
<0> HarrisonF, data_id
<0> RedACE, I'm using MySQL 5 personally.. this is for compatibility..
<8> SELECT DISTINCT s1.* FROM subscribers_data AS s1, subscribers_data AS s2 WHERE s1.demographic_id='10' AND s1.value = 'on' AND s2.demographic_id='4' AND s2.value = 'Peru' AND s1.data_id = s2.data_id;
<9> Help! I'm having a brain phart .. what's the function to return the first non-null value? SOMEFUNC(null, 'default')
<9> COALESCE
<9> phart is over
<9> (Hate it when you remember the answer the moment you ask the question :) )
<0> HarrisonF, I'm looking into that... I'm worried that allowing a variable # of demographics (hence demographic_id) is going to be a real mess
<0> HarrisonF, I have queries like ->
<0> http://pastebin.com/569110
<0> HarrisonF, also.. I'm getting no results from that query? & here's a short table dump: | data_id | demographic_id | subscriber_id | value |
<0> | 11 | 4 | 68 | Peru |
<0> | 12 | 10 | 68 | on |



<0> so, theoretically, it should return subscriber_id of 68..
<8> SELECT DISTINCT s1.* FROM subscribers_data AS s1, subscribers_data AS s2 WHERE s1.demographic_id='10' AND s1.value = 'on' AND s2.demographic_id='4' AND s2.value = 'Peru' AND s1.subscriber_id = s2.subscriber_id;
<0> HarrisonF, the query generator on this will be crazy (if it's extended to the query I pasted @ pastbin). Do you think it sacales? or should I create a seperate table with the demographic_id as columns, subscriber_id's as row's w/ their values ?
<8> bricecube: what is the maximum demographics allowed to be filtered on?
<0> HarrisonF, I used to have 10 (and there were 10 extra columns built into the subscribers table)
<0> HarrisonF, since then, I've created the subscribers_data table (demo_id, value, subscriber_id), and a demographics (demographic info) table.. and allow for 1000s of demographics
<0> it works fine.. until I try filtering ;)
<0> now I'm worried that my architecutre change was a bad idea ;(
<10> hi :)
<10> i have a question about mysql transac.. what happen if a thread is killed or connection closed before a commit is issued ? is the transaction explicitely rollbacked ? what happen at the next start transaction / set autocommit=0 (after reconnecting.. do i need to force a rollback then ? is the transaction scope only related to the current connection by default ? ) ?
<10> a lot of questions in fact =)
<8> endy`: when a connection dies, it's transaction will be rolled back automatically
<10> ok :)
<8> bricecube: well it comes down to correctness and common use cases
<8> do people really filter on 2134234 things?
<0> HarrisonF, they shouldn't ;)
<0> HarrisonF, but I could see @ 50
<11> am I missing something, or can you not do LEFT JOINs in a DELETE?
<6> Jivedue, what does mysql.com/delete say?
<8> i vote you are missing something
<6> I vote you can't
<12> I vote I wasn't even paying attention
<11> it says they can
<6> oh you can
<11> yah, no kidding
<11> just I can't get it to work
<6> paste
<0> HarrisonF, if they're filtering against say 50 or so values, do you think I should use the s1,s2,s3,s4,etc. method you described above? or a different one where I create a temporary table w/ demograhic_id's as columns? OR.. am I better off going back to the old method, a subscribers table w/ a set # of demographic columns (say 30) ?
<11> DELETE t1 FROM t1 LEFT JOIN t2 on t2.id=t2.id
<8> well you can only do 32 joins in 3.23
<0> Jivedue, depends on server version ??
<8> Jivedue: i think you mean t1.id=t2.id
<11> says unknown table t1
<6> do you have a table called t1?
<11> lol, yes
<11> I'm on MySQL 5.0.18
<6> heh
<6> on t2.id=t2.id?
<6> I missed that
<11> my bad, t1.id = t2.id
<11> but that doesn't make a diff
<6> well it does
<13> how goes?
<6> hi Guest38327892459
<14> tehehe
<14> I got a question
<8> root@world~> create table t1 (id int);
<8> Query OK, 0 rows affected (0.01 sec)
<8> root@world~> create table t2 (id int);
<8> Query OK, 0 rows affected (0.04 sec)
<8> root@world~> DELETE t1 FROM t1 LEFT JOIN t2 on t2.id=t2.id;
<8> Query OK, 0 rows affected (0.00 sec)
<8> works for me
<6> HarrisonF, add some rows
<11> you fkn serious?
<0> HarrisonF, should I be using IS IN ?
<14> the newer mysql uses a new authentication method
<14> but php seems to use the old style
<8> RedACE: rows wouldn't matter for "table not found"
<15> IT IS *FRUMPLE*!!!!
<16> !m Dark-Fear old client
<17> Dark-Fear: (Client does not support authentication protocol) : http://dev.mysql.com/doc/mysql/en/Old_client.html
<14> is there a way to enable the new authentication method
<11> HarrisonF: great, then I dunno wtf is up then
<16> Dark-Fear, Recompile the PHP binary with the new mysql library.
<14> reason I ask is it seems that in all my configs I see nothing
<16> client library
<14> but these pricombiled versions always work
<14> flawlessly
<16> Not in this case .
<14> what if your under windows?
<18> Jivedue: Are you aliasing tables?
<16> Dark-Fear, What about it?
<14> how would you recompile php with the mysql client?


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

#gentoo
#centos
#fedora
the postfix mail system is not running mail.err
#kernel
#python
#linux
#perl
kvm switch won't switch
#ai



Home  |  disclaimer  |  contact  |  submit quotes