| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Comments:
<0> wtf mates <1> i'm drunk already.. :P <0> awesome <1> visit http://irish.agoraproduction.com <1> and see the next party date ;) <1> hehe <1> i'm so getting ready :) <1> you coming ? <0> wish I could man <0> I've been working two jobs all week, and been sick besides <0> I need my rest <1> oh ok :S <1> I need my stout <1> hehe <1> frank-: thansk for protecting me <2> Hi all. I have this query: http://pastebin.com/537470 I'm stuck on MySQL 4.0, so I have no subquery. My problem is that L seems to be joining to table A a *lot* more than once per record. Is there a solution that can be done on MySQL 4.0?
<3> your stout? <1> perhaps you should pray mate. <2> CPUnerdX : I am indeed a priest, but in this case serious solutions would be nice also. <1> sweet :) let's see then <4> funny join <4> somePriest: explain output for same query? <1> hey I need to ask you something somePriest . You have to come to my city for St-Patty's day!!! We might have no priest because he's dead.. I'll have to go to the next city for this day.. <2> domas : The SUM used on table B and K look right, but the sum for table L is around 900,000, when it should be around 900. <4> somePriest: then you're doing something wrong! :) <4> somePriest: EXPLAIN may help you <2> CPUnerdX : I don't know who Saint Patty is, a Catholic thing perhaps? I don't drink. <2> domas : Oh, the SQL command. <1> St-Patrick <2> CPUnerdX : I don't know him, what's he like? We don't have Saints in our church, that's a Catholic thing. <4> somePriest: you have interesting concept there, joining same table twice, range scans in both.. <4> sure you have big products <2> domas : It joins the table to itself, by the date range isn't the same. <1> somePriest: I don't believe much, but st-patrick is the irish's saint, the one who worked his *** out to get food and get jobs, etc to the irish when the famine happened. <1> ok perhaps pvt <4> somePriest: use BETWEEN, it's more readable in queries ;-) <2> CPUnerdX : That's nice, we still don't worship saints though. <2> domas : Ok. But its exclusive right, not inclusive? <4> inclusive <4> and JOIN b, that will also look better ;-) <4> anyway, still your joins are somewhat too expensive <2> domas : Its joind in the where clause. <4> I know, I see <4> anyway, got to get some late night groceries ;-) <2> domas : Since table L does not have a one to one relationship with any of the other tables, I think its cross-joining? <3> cross joining is terribl <3> performance wise <2> I think that is what it might be doing, since its a many to one relationship in this case, maybe. <5> any ideas what is wrong with this statement? <5> $category_id = mysql_query("SELECT article_category_id FROM article_category WHERE article_category = '$category'"); <5> $category contains "Movies", and definetely exists in table <5> the $category_id = 0 though, when ti should = 1 <2> I used Explain on the query. I'm not really sure what I'm looking at though. <5> $category = $_POST['category']; <5> maybe that is what's wrong. <5> I printed it and it does contain "Movies", so shuld be found. <5> do I have to do that strip() thing?, can't remember what it is called now, strip slashes or something <2> gary : mysql_query returns a resource, NOT a string. <1> no <1> use mysql_real_escape_string <1> or mysql_escape_string <1> otherwise it will hurt. <2> It still doesn't return a string. <2> $result = mysql_query(...); $row = mysql_fetch_***oc($result); print "My value is {$row['article_category_id']}"; <5> so I need to do mysql_fetch_row? <2> Yes. <5> cool, thanks. <2> Or mysql_fetch_***oc, or any equivalent. See my example above. <5> thanks for the help. I haven't used php or any other web development language for about 3-4 months, seem to have got really rusty! <6> Hello <6> nice to find there is a chan for mysql <6> may be someone could help me <6> My mysql server crashed quite often ... so I need to make a script to check if mysql is running, and if not, would restart it <7> use mysqld_safe <7> that's what it's for <2> kalooni : Of you could fix the problem. <2> s/Of/Or/
<7> that would also be a good idea <7> crashing is not generally good ;) <6> somePriest: it is planned (a new server dedicated to mysql with much more ram is arriving next week) <6> but for this week end we need to deal with this <6> and have an automatic routine in order to p*** a better week end than the last one ;) <7> ..use mysqld_safe <6> what's that ? if i do a ps -aux |grep mysql I can find it <8> question on fields in a table ... is it possible to have a field that consists of a set of text files, that i can then query and display the info in the text files? think of it as a notes field that is updated and appeneded to, but with a seperate entry for each change. <8> or would i have to inject that data from a seperate table? <6> nobody use that kind of script for monitoring for example ? <7> !m kalooni mysql_safe <9> kalooni: Nothing found <7> !m kalooni mysqld_safe <9> kalooni: (The mysqld_safe Server Startup Script) : http://dev.mysql.com/doc/mysql/en/mysqld_safe.html <7> Please read <7> _That's what it does_ <6> ok thanks ;) perfect ;) <6> Leithal: last question: is mysqld_safe available for mysql 4.0 / 4.1 ? <8> did that make any sense? <7> kalooni: yep <7> soop: sounds like you want to keep revisions etc.? <10> !man uuid <9> (Miscellaneous Functions) : http://dev.mysql.com/doc/mysql/en/Miscellaneous_functions.html <5> just need a little advice here. I have a table with article categories, with id and text in it. So: 1, Movies; 2, Music; 3; Books. You get the idea. Another table has articles about these categories. Should I store the article category in this table as the ID or as text. <5> So the foreign key: shuld I have the ID, or the text. <5> Can't see any advantage. Disadvantage is looking up the text everytime I want to output the category. <7> id <8> leithal, basically, its a jobstatus dbase, and I want a notes field so that they can track progress, ideally i'd like a seperate entry for each note, but i think i'll have to settle for a text file that timestamps each new entry <7> why a text file? <7> just create a notes table <7> and link it to the "job" table <7> by jobid <7> or whatever <7> gary: specific advantage is that the size of an INT is usually smaller than the size of the string - and the aim of most databases is not to duplicate that kind of data <7> that's what the id's are for <8> thats what i figured i may end up doing <7> no need for text files <7> more bother to backup too ;) <11> hey <11> just got a quick question <11> im in phpmyadmin <11> any way to check what data is in each table on my database? <12> sportman: that's what the browse tab is for <2> Does SUM take place after joins? <11> i clicked the browse tab <11> lol <2> sportman : And voila, data appears :) <11> it does? <11> didnt for me <11> :( <7> somePriest: yes grouping is done after selection <12> sportman: than either you don't have any, the permissions are wrong, or phpMyAdmin is broken. <13> dont try to browse an empty table <11> hrmm <11> well <11> i made a php script to input it <11> and it seemed to work <11> but i dunno <11> i mean it errored when i had it set wrong <2> Leithal : Oh, shoot. If I had three table, with one-to-many relationships, and no sub-queries, how do I join three tables and do a SUM() on the data in each? Maybe this can't be done. <11> but now when i click submit it seems to work <4> temporary tables <3 <11> huh/ <4> hey <4> I'm eating!!! <11> http://www.qualityinterfaces.com/first/form.html <7> heh <11> see thats the form <11> i click submit and it seems to not error <4> quality interfaces! <11> so i thought i set everything up correctly <2> domas : You know that query I showed you? Well it gets 9,000 rows for one of them, and the DB only has 30 rows. The table that is getting the HUGE number is only using 15 rows (and each value is about 1 - 30). <11> what about qualityinterfaces domas?
Return to
#mysql or Go to some related
logs:
#perl #ubuntu phpmyadmin File could not be read ifidel visual #css 2D module incompatible with OGL client module #linuxhelp #mysql #fluxbox is_function: not found gentoo
|
|