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



Comments:

<0> jpm_: Conquering nations yet?
<1> dude, it's coming along nicely
<0> nice one, getting in to the office life again then?
<0> I still have no idea where the hell you went
<2> Drakas: Do this: SELECT count(*) FROM li_article_content GROUP BY article_title HAVING count(*) > 1;
<2> Drakas: Tell me if any rows are returned.
<1> yeah, commute is kind of annoying
<1> but not that bad
<0> gets you out of the house I guess ;)
<3> hi all
<3> Is there any way to prevent a account to crash myslq ?
<3> s/myslq/mysql
<0> do not give them privileges to connect ;)
<4> Xgc logically yes, there wold be around 26
<2> Drakas: Then try this: SELECT count(*) FROM(SELECT DISTINCT article_date, article_user, article_id as article_edit_id, article_title FROM li_article_content) v1 GROUP BY v1.article_title HAVING count(*)>1;
<2> Drakas: This is the key test.



<4> Xgc i am done, i dont need anymore help :)
<4> oh ok
<4> ill try
<4> 21 rows
<4> key is count(*)
<3> Leithal , good say :) but they are hosting customers :) so I have to
<2> Drakas: That proves your query is invalid, even though you think *it works*. It's not valid and producing invalid results.
<1> Leithal: ssc shift today?
<0> jpm_: yep
<1> hah loser
<0> had the day off yesterday for my son's birthday ;)
<0> worked out well
<0> it's dead anyway so I'm playing ;)
<2> Drakas: But as long as you *think* it works, that's all that matters.
<4> oh right
<4> Distinct article_date ?
<4> makes sense now :))
<4> it shouldnt return anything ...
<0> jpm_: I'm creating Javentum
<2> Drakas: If each article really had one and only one distinct set of data to insert, then the query would find only one row in each group for that last query.
<1> yeah, the bloatness will be a match made in heaven with j2ee
<4> the thing is that all i really wanted to insert was the latest article_date for each article_title and also take the article_user
<0> jpm_: I'll be sure to put some clock applets and **** in it just so it has extra bloat too
<4> my query return everything fine though
<2> Drakas: MySQL GROUP BY behavior hides that detail. Standard SQL does not allow that construction. No standard engine would process that query.
<1> oh, no need
<4> Xgc ook
<0> heh
<2> Drakas: No. That's the problem. You don't even realize the error.
<4> you're really conmfusing
<4> so the serror is that the statement is invalid in SQL but nto in MySQL?
<2> Drakas: Would you think everything is fine if the engine said "invalid use of non-aggregate" and refused to do anything?
<4> noo
<2> Drakas: The point is the relational operation you are attempting is INVALID.
<2> Drakas: But MySQL does not detect this relational problem.
<4> ok
<2> MySQL treats this as a feature.
<4> :)
<0> For a list of features see http://bugs.mysql.com
<2> Drakas: For 20-some of the articals for a particular title you have more than one article user, date or edit_id.
<2> articles, that is.
<1> it's kinda like lego, but for databases
<1> it's a toy database!
<1> get it?
<2> Drakas: But your query is deciding to return just one of those values. It's hiding data that you might need/want.
<0> jpm_: It's like a teddy bear when you want transformers eh
<4> Xgc but all i want is the last edit's user
<4> i dont need list of all the users etc.
<4> all i want is to really put the data of the very last edit into the article list
<2> Drakas: It's not guaranteed to return that.
<2> Drakas: To do that you need to find another MySQL article and apply that.
<4> Xgc ok, so if i got the edit ID 201, would i get some different date, or user than edit 201 ?
<1> Leithal: right, exactly
<2> Drakas: http://dev.mysql.com/doc/refman/5.0/en/example-maximum-column-group-row.html
<1> Leithal: or it's like sqlite, but evil and a bit faster
<2> Drakas: The query you have is not guaranteed to return related data the way you want.
<4> Xgc : i am not 5.0, i am 4.0 & 4.1
<0> jpm_: lol
<4> OK thanks i got it



<4> :]
<0> with more "features"
<2> Drakas: 4.1 is fine. 4.0 would require temp tables to do this.
<4> yes
<4> 4.0 is my live server and 4.1 my test win server
<2> Probably would have been much easier to just let you think it works.
<4> so i have to make sure that everything works with 4.0
<2> You might never have noticed the errors in data.
<4> yes
<4> i checked, everything is ok
<2> Right. Just because the data could be wrong doesn't mean the data is wrong. It could have produced the correct data by chance.
<2> or due to some fluke in implementation.
<4> let me check five records
<4> yep its all ok
<2> Drakas: If you have a process control system that could blow up with incorrect data, if you needed a list of even integers, tried rand() to obtain them and found the first 5 you tested were even, you'd be happy?
<2> Isn't it sufficient to you to know the algorithm is wrong?
<4> thanks for telling me
<4> i will keep that in mind in future
<2> or it only a problem if it's easy to understand the algorithm is wrong?
<4> ;s
<2> Ok. Lesson over.
<2> Move far away from that plant.
<4> agh
<4> my project is soo complicated
<4> a good alternative to MediaWiki, but with much less features :)
<4> more of a Wiki-Homepage, not just Wiki
<4> how can i count total lines in the whole directory and its sub-dirs?
<4> any util?
<1> yes, google!
<4> looked
<4> just will do php
<2> Drakas: find /some/dir | wc -l
<4> im a windows user :)
<2> Drakas: Me too. That works just fine.
<4> my net card doesnt have working drivers
<4> 'wc' is not recognized as an internal or external command, ...
<2> Drakas: http://www.cygwin.com/
<4> i've got it
<2> Then use the correct shell.
<4> agh just will have to look for that php script which i found
<5> hi
<4> 12437
<4> :)
<4> i think i spent around 120 hours already
<4> :D
<5> not bad
<4> started just before new year,
<4> hi WebMonkey
<6> when i'm creating a row in a table what are differences between "index", "primary", and "unique"?
<7> I got a Database with a lot of numbers
<7> How to get the average value?
<4> Denn lookup avg in mysql
<4> manual
<8> Melbell: a primary key is the primary method by which your rows are identified, usually an auto_increment column
<8> Melbell: the primary key is always unique
<7> Drakas found it :)
<8> Melbell: a 'unique' index is just that - it's an index where each row must have a unique value, or inserts are rejected
<8> Melbell: an index is just that - an index, used to speed the locating of rows
<6> Darien: does "index" have to be unique, though?
<8> no
<9> Howdy all
<8> otherwise what would be the point of having a separate 'unique' index?
<6> Darien: so how does an index speed the locating of rows?
<8> Melbell: ever used an index in a book?
<9> What does everyone do as far as backing up MySQL databases? Just run mysqldump regularly?
<6> Darien: yeah
<8> CuriosCat: and replication too
<8> Melbell: if you want to know where 'foo' is in an 800 page textbook, you can either read through the entire 800 pages, or go to the index and look up 'foo' to find which page number it's on
<8> Melbell: same concept
<9> darien: Replication sounds like a neat concept. Besides the official documentation, any idea where I can learn more about it?


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

CC_OPTIMIZE_FOR_SIZE -patch
american army for linux -forum -forums
#gentoo
suse splash=off
#perl
#perl
cold war 0x00000021
gpe on edb9315A
yumex downgrading
protocol not supported smb gentoo



Home  |  disclaimer  |  contact  |  submit quotes