| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
Comments:
<0> select planets.planetid,planets.systemid,starmap.name,player.namefrom planets left join starmap on planets.systemid=starmap.id left join player on planets.ownerid = player.id where planets.systemid = (select player.home_id from player where player.name = 'I3ooI3oo') <1> hi all, can someone tell me if you can get cols from two tables where both ID = X? The SQL I have now works only if there is an ID matching X in both tables. <1> SELECT COUNT(Comments.Comment) AS Comments, COUNT(Vote) AS Votes, AVG(Vote) AS AVG FROM WPAlbum.Votes LEFT JOIN WPAlbum.Comments ON Comments.PhotoID = Votes.PhotoID WHERE Comments.PhotoID = 658 <0> the querey work with out the sub querey in the where clause and still work if i give it the vaule of the querey <2> elazar: i'm not sure if i need transaction support or not. i'm just using this in a php app.. i know i won't be doing actual batch transactions (with commits, rollbacks, etc). i just need it to be fast since it's a click tracking / reporting app <3> hi all, i have a field named: myfield the values are: 'A123' , 'A45' , 'x67', 'TR-089' my question is: how get only the numbers of each record? thanks <0> c <4> I3ooI3oo, Hmm... Not sure why it errors there. Why do you even use the subselect? Make players an INNER JOIN <4> Since you require it. <3> sub..... any sample? <5> LinuxKrn <1> what? <5> LinuxKrn: do not use left join <6> LinuxKrn: that looks fine. Are you missing rows?
<5> inner join is enough this way <6> gogocomeon: not if there are no comments <7> wikkid: Ah. In that case, I would think that MyISAM would be a better format for your purposes. I can also tell you for sure that MyISAM data is organized by using directories per database and files per table for structure, data, and indices. As such, in the case of MyISAM, I wouldn't think that performance loss would be any more severe for tables in different databases as it would be for tables in the same database. <5> if you don't need null values <1> well problem is there are votes, but no comments on that ID, so it returns 0, 0, NULL <4> Elazar, InnoDB uses dirs for databases and *.frm for table definitions. <1> but it really is 0, 2, 5.0 <8> how important is keycache <2> elazar: i don't know too much of the differences between innodb and myisam... i thought innodb was just "better" ;) i'll do some research on the two.. thanks <6> LinuxKrn: actually, you don't have a group by on there. Should it have a group by PhotoID? <8> im trying to myisamchk -f -i -c a table, but its 500 megs, and going sloooooooooooooooooooow <6> _sho_: very <1> inviso_: no, because there is only one photo selected <8> so loss of keycache is bad for a table? <6> LinuxKrn: right. Only 1 vote per photo? If not, the group by will be implicit but you ought to include it anyway <1> Got votes in one table, comments in the other, and I want to get count(vote), avg(vote), count(comments) <1> ok <8> is there any way i can speed up the myisamchk so it doesnt take 1 minute per meg? <7> wikkid: InnoDB has transaction support but no full-text searching support. MyISAM is the other way around. Bother are good for the purposes they serve. <7> s/Bother/Both <0> wil_: will that still work since the i don't yet know the value of the systemid yet ? <7> will_: How does InnoDB store data and indices? <2> elazar: good sumation. i'll look into it in more detail. thanks again :) <1> hum... not it returns an empty set <1> now even <6> LinuxKrn: heh, found it. Change it to WHERE Votes.PhotoID=658 rather than Comments.PhotoID <0> will_: now the querey with out the sub doesn't function <1> still only returns empty set when I add GROUP BY Votes.PhotoID <7> wikkid: NP. :) Good luck. <6> LinuxKrn: ok, run this. select V.PhotoID, count(V.Vote) AS Votes, AVG(V.Vote) AS vote_avg FROM WPAlbum.Votes V GROUP BY V.PhotoID; Should give you a list of your photo IDs along with the counts <9> i have two tables. one with a field called "reporteri", one with a field called "rep" <1> yes and no, there are two photoIDs there, but there are say 30 in the table; <9> how do I select all from reporteri but not in rep ? <1> sorry, forgot to remove the comments stuff <1> ok, works now <6> LinuxKrn: ok, next. select V.PhotoID, count(V.Vote) AS Votes, AVG(V.Vote) AS vote_avg, count(Comments) as comment_count FROM WPAlbum.Votes V LEFT JOIN WPAlbum.Comments C ON V.PhotoID=C.PhotoID GROUP BY V.PhotoID; <1> that works <6> excellent :) <1> hum <6> now, time for lunch ;o) Good luck figuring out what was really wrong <1> hehe <10> BOOM <10> HEADSHOT <6> Therion: owWWWWWW!!!!! <1> thanks inviso_, need to figure out what I was doing wrong <4> Therion, How come I can't edit the main wiki page? :( <10> coz I don't allow anybody to edit it <6> buh bye Therion <4> Therion, What if I want to edit it? <10> oops <10> will_: THEN BE ME <4> Innocent bystandards are justifyable costs of war. <11> there is no such thing as an innocent bystander <6> rofl <6> poor Invisible_Magi <10> Wife has been playing WoW and I just can't seem to care <10> Screw it
<6> And poor Therion who doesn't realize he's already dead ;) <10> Eve Online for me <10> inviso_: you cannot reach me in my spaceship <11> Therion: how are you liking it? <10> I travel 3 AU a second bitch <6> /farewell <10> shabbs: Eh, I've always liked it :P <10> I like it more now <4> Ok now can I change the main page of the Wiki? <10> No <7> Therion: What server does your wife play on? :P Mine plays WoW too. <4> :( <10> Elazar: We mostly played Argent Dawn; I guess she still does <10> If they ever get rid of the queues maybe I'll go back <10> will_: If you want to meet naughty housewives you want Second Life or Anarchy Online. <11> I think he wanted to meet your wife <11> so he can be you <10> Not that there aren't plenty of them on WoW <11> and edit the wiki page <4> shhhhhhhhhhhhhhhhhh <10> shabbs: He's too nice to be me <12> (Depending, of course, on whether you prefer Objectivist or Libertarian housewives) <10> haha <4> Now can I be you? <10> No <10> Are you sure you can't edit it? <7> Therion: I play myself when I'm not in school. <4> shabbs, INNOCENT BYSTANDER? NOPE! <11> nope <0> YES <4> Therion, There is no edit button for me. <13> <7> Therion: I play myself when I'm not in school. <10> Elazar: And WITH yourself too no doubt <13> i read that so very very wrong <10> I play with rioter's girlfriend when he's at school <13> haha <4> No, rioter is married. <13> we have matchign time tables so <10> will_: Are you logged in? <7> Therion: Guess I should have seen that coming. :P <4> Not now <10> Elazar: :) <7> (2:28:37 PM) Whitney: I went and raped Scarlet Monastery earlier <4> rioter, I need an updated pic of your girl. <3> hi all, i have a field named: myfield the values are: 'A123' , 'A45' , 'x67', 'TR-089' my question is: how get only the numbers of each record? thanks <7> Yup... that's my wife. :P <13> will haha whys that <4> rioter, I care <4> Therion, Now I'm logged in <13> will haha <4> I don't have the edit tab for the Main Page <11> BECAUSE YOU'RE NOT THERION <4> rioter, Feel free to E-mail it to me anytime.. willfxp@yahoo.com <13> haha <4> Actually, willfxp@gmail.com <4> :) <13> hang on let me find one <1> when is mysql going to get DO AS I WANT, NOT AS I SAY? heheh =p <11> when you learn to say what you want <10> Elazar: Last time we went to Scarlet Monastery, we were the ones who got raped :P <10> Elazar: Not exactly a place to try to clear out with just two rogues :P <7> *lol* <7> (2:32:55 PM) Whitney: you can clear it easily with 2 rogues if you take your time and don't try to rush it.... crowd control is the key <7> Therion: What level are you two? <13> i still think one of the funniest screenshots from WoW for me was a shot of the online store <13> they had sold out of xl xxl and xxxl tshirts <14> you still playing wow Therion? <12> rioter: nice :) <15> ive just installed mysql 5.0 on the latest debian smp release, i have 4 processors, i want to test mysql and make sure it is taking advantage of all 4 procs, is there any easy way i cna do this? <16> !google super smack <17> super smack: http://jeremy.zawodny.com/mysql/super-smack/
Return to
#mysql or Go to some related
logs:
#php #osdev Installing DecoratorTools hidd rejected fedora rtl8201cl xte xnee e1000 no ebuilds gentoo #ai +enemy-territory.rpm #mysql
|
|