#mysql - Mon 5 Mar 2007 between 00:01 and 01:33



XgcDanJ22: You need to use something like aggregation and a JOIN.
DanJ22Hrm, I wrote out an inner join but had grouping errors
XgcDanJ22: Start with something really simple and work from there. Don't confuse yourself trying to do it all at once.
DanJ22: COUNT(t.CATALOG = t.CATALOG) <-- This is a problem.
DanJ22: I dno't know much about your schema, but it looks like you left out at least one join.
DanJ22hrm, hang on lemme check history
haysXgc: kimseong, thanks, got it
DanJ22sure I already put one in
XgcDanJ22: Right. You need another.
DanJ22: You describe a problem with A table (that means one to me) and then proceed to show a join of 2 tables.
DanJ22: That ONE table in your description needs to be joined with itself. That other table is pretty much immaterial with respect to the aggregation you need to do.
rtanhelo
DanJ22actually, come to think of it I need to pull the initial list seperately
brb
rtanhelo DanJ22
XgcDanJ22: having said that, maybe your description was completely wrong and as a result my comment is wrong.
DanJ22ok I have 2 tables, first table has catalog #'s, table 2 has catalog, name, artist, title and Each catalog number in table 2 appears anywhere from 1 - 4 times
XgcDanJ22: Ok. So start by joining t2 with itself to find the counts you need.
DanJ22i need to pull all rows in table 2 where cat# in table 1 = cat# in table2
arooniok if i want a generic table i'll inherit from... and it should track ad impressions and ad clicks....
what should i call that table
what is a higher level name than impression or click
DanJ22then count how many times cat# in table 2 occurs (anything from 1-4)
XgcDanJ22: You only need table 2 for this part. Are you saying some t1's are not found in t2 and you need to see a count of 0 for those?
DanJ22yes
XgcDanJ22: That's fine. Just perform the t1 LEFT JOIN t2 ON ... GROUP BY t1.catalog ... to find the counts and then JOIN this result with t2 to obtain any non-aggregates needed.
WoostaGiven an ENUM() field .. is there any query that will return the values from that list?
Docs say: If you want to determine all possible values for an ENUM column, use SHOW COLUMNS FROM tbl_name LIKE enum_col and parse the ENUM definition in the Type column of the output.
XgcWoosta: Maybe via information_schema. But this is one reason enums aren't a great idea. You should have a separate table.
WoostaYeah, I'm kinda stuck with it .. I'll just parse it
rtanhello
aroonii have two types of users.... authors + readers .... readers pay authors money. authors are paid based on the number of downloads of their ebook
i want to allow authors to checkout... and get paid based on their downloads
how should i model the payment side
in terms of tables
rtanhey i have 3 colums Pin,Win,Segment and i want to combine all value into one colums Project Number, how can i write the CASE statement
CASE WHEN dbo.Project.PIN IS NULL
THEN dbo.Project.WIN ELSE dbo.Project.PIN END AS ProjectNumber
blueandwhiteg3where does mysql keep its data files under FC2? i feel like an idiot, but i can't easily find this location....
firewireshow variables like 'datadir';

Page: 2 9 16 23 30 37 

IrcArchive