#mysql
26 December 2007
Total 10 pages. You are browsing page 1/10.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
--- Log opened Wed Dec 26 00:00:48 2007
00:14 <****> hi, I have this query to do and I dont even know if I can or will need a script
00:15 <****> I have 3 columns, a b and c, which should give a | b with new cords for all the values in c not present in b
00:15 <****> does that even make any sense?
00:16 <****> I'll pastebin an example
00:18 <****> http://dpaste.com/29028/
00:19 <****> basically you merge b and c
00:19 <****> and distinct that
00:19 <****> and for each of those you create an entry with a
00:22 <****> the thig is, it's not a CONCAT
00:22 <****> I want to add a row
00:28 <****> spike: you need a left join or a subquery. I'd go with left join.
00:29 <****> to find stuff that's not there, you need left joins or equivalent subqueries.
00:32 <****> arjenAU: ok, thank you for the pointer, I'll think about it
00:33 <****> that's always good.
00:49 <****> with what command do you get the list of databases
00:50 <****> show databases, but please RTFM, it's really a basic thing described in every tutorial
00:50 <****> don't have the desktop space for manual
00:50 <****> o_O
00:50 <****> O_O
00:51 <****> \g show databases
00:51 <****> No query specified
00:51 <****> cisko: multiple desktops. any good linux or mac has it.
00:51 <****> SHOW DATABASES\G
00:51 <****> even win can do it with a bit of foo
00:51 <****> \G is the line terminator.
00:51 <****> Simetrical: wouldn't use \G for that.
00:52 <****> it's anarrow result set so no need.
00:52 <****> Well, I was more illustrating the principle.
00:52 <****> I also would use ;.
00:52 <****> can i find a list of the commands somewhere
00:52 <****> cisko: it's called the manual.
00:52 <****> !man
00:52 <****> Sorry - I have no idea what function you're talking about! but try http://dev.mysql.com/!man
00:52 <****> mysql.com/doc
00:52 * Simetrical mutters
00:53 <****> I type quicker than you can work out the proper keyword for wench
00:53 <****> does it have a list where all the commands are at one site
00:53 <****> so that they are not spreaded over millions of pages
00:53 <****> cisko: you are quickly approaching the point where you get a banana for being an (in your case untrained) monkey rather than a homo sapiens.
00:54 <****> o well monkeys get banana when they did good
00:54 <****> sql servers are elaborate contraptions. so they have big manuals. you can have quickrefs but they won't teach you everything. what you want is to get a good book or something, and learn. then you can use the quickref to refresh mem whileworking.
00:54 <****> hey, monkeys dont get bananas for nothing
00:54 <****> exactly
00:54 <****> cisko: exactly. I rate humans higher.
00:55 <****> quickref yea
00:55 <****> thats what i need
00:55 * arjenAU notes how cisko read but didn't actually listen to what was said. and thus gives up. have a nice day.
00:55 <****> ur just writing the wrong things ;)
00:55 <****> im not trying to really start learning any SQL
00:56 <****> just need the row count of my URL database cause im interested how many URL:s i have already :-D
00:56 <****> cisko: that's ok, it's your time to waste.
00:56 <****> cya
00:59 <****> evil evil man
01:07 <****> yea.. well thanks ALOT
01:07 <****> and by that note /me feels vindicated.
01:12 <****> hi guys, i'm making a bulk INSERT
01:12 <****> can i have all the inserted ID's ?
01:12 <****> primary keys
01:14 <****> you can have the first insert id and the number of rows
01:14 <****> ok
01:14 <****> hey ive got a question guys, i have heard that it is a bad idea to store an image in mysql, how about a wave file or a mp3 file?
01:15 <****> it's not that you can't store them in mysql
01:15 <****> it's just that mysql isn't as efficient at moving large blobs around
01:16 <****> i see, so its best to just store the pathname to the file in the database
01:16 <****> ?
01:18 <****> yeah
01:22 <****> wow there's so much other stuff to learn besides query names.. where to start?
01:51 <****> ho ho ho
01:54 <****> hrm does phpadmin do everything that mysql admin does ?
02:03 <****> alex_: anything that you can do with SQL statements. mysqladmin also can shutdown the server
02:14 <****> eeer, I cant even solve a simpler case of that... or at least in principle it looks simple, cause it seems to me it's the same logic minus the if condition :/
02:18 <****> Is anybody aware of either a) a mechanism for library sort order in mysql or b) a php implementation of library sort order?
02:25 <****> puff`: What's the special deal with that sort order?
02:27 <****> k: library sort order sorts strings the way a librarian would.
02:28 <****> puff, it's probably not possible to fully implement such sorting automatically, and certainly not cross-lingually.
02:28 <****> me, I dont really see how one would merge two columns
02:28 <****> puff, MySQL sorts according to the provided collation. It does not, for instance, attempt to remove words like "The" when sorting.
02:28 <****> I've tried with unions and inner joins but I cant get it right
02:28 <****> At least I'm not aware of a collation that does that.
02:28 <****> spike, what do you mean, merge two columns?
02:28 <****> Simetrical: Hm, collation?
02:28 <****> puff, yes, check the manual.
02:28 <****> !m collation
02:29 <****> collation see http://dev.mysql.com/doc/refman/5.0/en/.html
02:29 <****> !man collation
02:29 <****> see http://dev.mysql.com/doc/refman/5.0/en/collation-character-set-applicability-table.html
02:29 <****> puff: A collation is a rule set for sorting a certain character set.
02:29 <****> Simetrical: a table with 2 columns, a | b , containing 1 2 | 1 3 . I want in output one single column with 1 2 3
02:30 <****> so it's like merging the values in both columns and get the distinct of it
02:30 <****> Simetrical: "stop word" support for sorting would seem to be the key.
02:30 <****> spike, get a better table. SQL is not meant for dealing with denormalized arrays like that.
02:30 <****> altho I actualy have 3 columns, but same idea
02:30 <****> Simetrical: eh?
02:31 <****> spike, you want each column to contain one value and one value only. Not two values, like "1 2". Do not try to treat a single column as having multiple values, or you'll run into problems like this.
02:31 <****> Columns should not be used to contain arrays.
02:31 <****> eeer, no
02:31 <****> what I meant is
02:31 <****> a | b
02:31 <****> 1 | 2
Total 10 pages. You are browsing page 1/10.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
