Home Page   #c  #ruby-lang  #cisco  #mysql  #apache  #javascript  #java  #perl  #php  #openmoko   Wallpapers Girl
Reliable $1 Web Hosting by 3iX

Channels


#mysql

07 November 2007


Total 24 pages. You are browsing page 24/24.

First :: Prev :: [...] [20] [21] [22] [23] [24] :: Next :: Last

23:13 <****> DaMouse: not making sense
23:13 <****> jbalint: it's a list thingy majigga
23:13 <****> db4n: or you can add a date column, then update your table - set new_col = date(old_col)
23:13 <****> try lists.php
23:14 <****> lcid basically refers to which item that one should be a subtree to
23:14 <****> DaMouse: My best advice, with no clue what you'r talking about.. do an order by lcid
23:14 <****> Shariff: that comes out 11,13,12,14
23:14 <****> or write your own sort to take all that into account
23:14 <****> lists.php?
23:14 <****> ki77a77 that sounds good.
23:16 <****> DaMouse, how many levels deep is this?
23:16 <****> DaMouse, just one?
23:16 <****> uhm
23:16 <****> as many as it goes really
23:16 <****> ok.
23:16 <****> lcid could be set to 14 and it'd go another level
23:16 <****> what kind of data is this in the real world?
23:16 <****> it's actually a series of comments
23:16 <****> and lcid referes to the comment I'm replying to
23:16 <****> aha...thread in a forum?
23:17 <****> kinda
23:17 <****> DaMouse: with this structure there is no other way than to walk all levels....
23:18 <****> DaMouse: iow, not one query...not with mysql
23:18 <****> hey all
23:18 <****> how do i see what is being skipped when loading data?
23:18 <****> meh, I'm trying to ask the table to talk to itself
23:18 <****>_<
23:18 <****> DaMouse: you can do that...one level
23:19 <****>_<
23:19 <****> DaMouse: so you can do: FROM myTable as parent LEFT JOIN myTable as child ON parent.cid = child.lcid
23:20 <****> DaMouse: wait...
23:20 <****> DaMouse: lcid and rcid?
23:20 <****> DaMouse: ok - you got a nested set?
23:20 <****> if i had rcid I could do it
23:20 <****> but I don't
23:21 <****> DaMouse: so, you *don't* have a rcid?
23:21 <****> nope
23:22 <****> DaMouse: read up on this http://dev.mysql.com/tech-resources/articles/hierarchical-data.html
23:22 <****> DaMouse: then decide for yourself what you are going to do.
23:24 <****> scream
23:24 <****> mainly
23:30 <****> hi everyone i am a mosque
23:31 <****> milkcan: Are you some sort of Islam?
23:32 <****> yes!
23:32 <****> allahu akhbar
23:32 <****> Derned Islams!
23:33 <****> Go back to yer, er, magic carpets and fly back to Zanibar or wherever you folks come from
23:33 <****> heheh, anyway..
23:34 <****> Can someone tell me why http://rafb.net/p/upqel123.html that doesn't give an error, but doesn't add anything to the database either?
23:34 <****> Por favor?
23:36 <****> I have a query I'm trying to optimize out of temporary filesort hell, but I'm having trouble finding a legible way to pastebin the explain results..
23:36 <****> Is there an easy way to do that?
23:36 <****> such that they are legible?
23:37 <****> KomodoKoffee: what about just using the sql-query directly instead of having a programming langauge as additional layer?
23:38 <****> Because I need to insert many , many items, and doing so one by one isn't practical
23:39 <****> KomodoKoffee: but first you hvea to find out what is wrong in your SQL-Query. If that works you can put it into a programming language - and if it doesn't work there you haev to look on their side
23:42 <****> hey, I am using the LOAD DATA INFILE feature, but I have a field in my .csv file in this format: 03-NOV-2007 21:45:22
23:42 <****> How do I convert that to a DATETIME?
23:43 <****> Oh well. Anyway, I would really appreciate some help trying to optimize this query. I select A with a where and group by. I full join B and everything is okay, but when I left join C and D through B, it starts doing a temp/filesort on B. Here is the query with explains: http://pastebin.com/d2f9d2168
23:43 <****> idiocrash: what version of mysql?
23:43 <****> 5
23:44 <****> idiocrash: load that data into a user variable, like @date. Then set the field to strtodate(@date, '%the%proper%format%string%here');
23:44 <****> idiocrash: see the LOAD DATA and Date/Time Functions manual pages for details
23:44 <****> !man load data infile
23:44 <****> (Problems with NULL Values) : http://dev.mysql.com/doc/mysql/en/problems-with-null.html
23:44 <****> no
23:45 <****> !man load data syntax
23:45 <****> (LOAD DATA INFILE Syntax) : http://dev.mysql.com/doc/mysql/en/load-data.html
23:45 <****> !man date time functions
23:45 <****> (Date and Time Functions) : http://dev.mysql.com/doc/mysql/en/date-and-time-functions.html
23:45 <****> ok cool. thank you
23:47 <****> I've got something like: 'Select field1 as retval from table' . And 'Select field2 as retval from table'. Now I want to compare 2 fields with each other, and then return one of the fields I need (I only need one). How do I do that in a query? I can't really find the docs looking at the if statement
23:47 <****> Freakingme|: which one?
23:47 <****> that is, return which field?
23:48 <****> that depends on the output of the if statement
23:48 <****> Freakingme|: SELECT IF(someCondition, field1, field2) AS retval FROM table;
23:49 <****> hmm, that easy. thanks
23:49 <****> if someCondition is true, you'll get field1. Otherwise, field2.
23:49 <****> Is it likely I might be able to get this type of index optimization help on this channel? Does that kinda thing happen here very often?
23:50 <****>0),field_notfirsttime,fieldfirsttime) AS retval FROM table ?
23:51 <****> snoyes: how do i load a field into a user variable from a CSV using the LOAD DATA INFILE method?
23:51 <****> idiocrash: It's shown on the manual page. You put the user variable in the column list.
23:52 <****> snoyes THANKS, I got it working
23:52 <****> idiocrash: search for the text "As of MySQL 5.0.3, the column list can contain either column names or user variables."
23:57 <****> Rince: Duplicate entry error. "D'oh!"
23:58 <****> KomodoKoffee: well, there is your problem - you try to have the same entry twice or at least the same primary key
23:59 <****> I know, I fixed it. :)
23:59 <****> I just did $j = $i + 22 instead of $j = $i + 19
23:59 <****> Are there any other good places to plead for help with query/index optimization?
23:59 <****> snoyes: When I use the str_to_date() function, does mysql know that NOV is the month of November?
--- Log closed Thu Nov 08 00:00:24 2007


Total 24 pages. You are browsing page 24/24.

First :: Prev :: [...] [20] [21] [22] [23] [24] :: Next :: Last


Tutti i nuovi CAP Italiani. Come ottenere il database completo