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

Channels


#mysql

29 December 2007


Total 18 pages. You are browsing page 1/18.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last

--- Log opened Sat Dec 29 00:00:02 2007
--- Day changed Sat Dec 29 2007
00:00 <****> cpunches: That's why you write an application on top of the database, to insulate the user from those details.
00:00 <****> as opposed to just indexing the linked fields?
00:00 <****> Xgc, yes, but that's not the design stage im at on this project
00:00 <****> you can also use *value* as well as *values* right?
00:00 <****> cpunches: Yes, but you're asking about that stage.
00:01 <****> cpunches: "I don't want the user to have to touch the database directly", is asking about the application that will insulate the user from the database.
00:01 <****> Xgc, differing opinions of programming design, apparently. i think the backend should be well designed, too.
00:01 <****> oi.
00:02 <****> cpunches: That's fine. Then don't talk / ask about the user if you wish to discuss just the database design issues.
00:02 <****> cpunches: That's just a suggestion, not a personal attack.
00:03 <****> It's often tough to tell in irc.
00:03 <****> Maybe you meant something else.
00:04 <****> Xgc attacked me, you all saw.
00:04 <****> kill them all, now
00:04 <****> prakriti: The benefit is due to the index. The foreign key is for data integrity.
00:05 <****> s/benefit/performance increase/
00:06 * Xgc can't help being so mean.
00:08 <****> hehe
00:12 <****> oh. its cool. i spent two years in ##slackware . You don't know mean lol
00:12 <****> http://rafb.net/p/sthAgA63.html
00:12 <****> If you see the bottom result, I basically want to know if there are multiple columns with non-0 results.
00:13 <****> If not, I want to return just the name of the column with a non-zero result.
00:13 <****> So, it could say either: "Multiple", "Other", "Atypical", "Injectable"
00:14 <****> The final result I'd like to get would be PatientID Type where Type is one of ^^
00:14 <****> Hope that made sense :)
00:17 <****> jordn: If you have a test case, that might help clarify your intent. Post create table statements and insert statements to provide a small set of data and then show the output you want to generate, based on that test data.
00:17 <****> Hrm
00:17 <****> Did you see my paste?
00:18 <****> jordn: Yes.
00:18 <****> The bottom shows the current output.
00:18 <****> I'm basically wondering how to go from that, to:
00:18 <****> jordn: I need to see your tables and data and the expected output, not the broken output.
00:18 <****> PatientID - 1, Type - "Other"
00:19 <****> ok, I'll paste my schema and expected output, sec.
00:19 <****> Just a suggestion. Usually that gets an answer very quickly.
00:20 <****> http://rafb.net/p/wj80Yn26.html
00:21 <****> I think you'd need to refer to both pastes to understand what I want to do
00:21 <****> Thanks in advance Xgc
00:21 <****> jordn: You forgot to show the inserts.
00:22 <****> jordn: You can't won't normally get useful output from an empty set.
00:22 <****> ok, I'll make up some inserts
00:23 <****> Obviously, if you just wanted that output, you could do this: SELECT 1 AS PatientID, 'Other' AS `Antipsychotic Type`;
00:24 <****> so i can use 3306 to access my home db?
00:25 <****> NetEffect: If MySQL is listening on that (default) port, yes.
00:25 <****> http://rafb.net/p/SlosW792.html
00:25 <****> where do i check that, in the ini file?
00:25 <****> NetEffect: and you have access.
00:25 <****> NetEffect: netstat can tell.
00:25 <****> Xgc - That's not what I meant though.
00:25 <****> I want to modify the SQL I have, to determine the Antipsychotic Type based on the SUM's.
00:25 <****> jordn: Right. I realize that.
00:26 <****> So, if the SUM of more than 1 type is greater than 0, the Antipsychotic Type = "Multiple", otherwise, it's just the name of the Type with non-zero value
00:26 <****> jordn: I see. Then you might consider a slight design change.
00:26 <****> ok well right now i'm opening 3306 in my firewall first
00:26 <****> What woudl you suggest? (Design is not really in my control for certain aspects of this).
00:27 <****> jordn: If you wish to handle those calculated values as a set, the data probably needs to be slightly more normalized.
00:27 <****> Hm, I think it should be possible with the given schema.
00:28 <****> I can already get at the 3 values I need. Now I just need to do some work with them.
00:28 <****> jordn: AllCodes or some other table should have one row per type. You calculate the sums with a SELECT type, SUM(val) ... GROUP BY type
00:28 <****> jordn: Then you can select the non-zero entry more easily.
00:29 <****> jordn: Correct. You can do it with your current design. It's just a little inconvenient.
00:29 <****> Hm, so should I put the current output into a derived table?
00:29 <****> And then SELECT based on that?
00:30 <****> ok i have 3306 open in firewall, i see 3306 in my.ini...
00:30 <****> do i have to forward 3306 on my routers? i'm behind two
00:30 <****> Or is it reasonable to just take this current output, bring it into my programming language (C++) and do my work there?
00:30 <****> jordn: What if more than one is non-zero?
00:30 <****> Then the Type is called "Multiple"
00:30 <****> There will never be a case where it is all 0's
00:31 <****> do i have to "Run" anything on tihs box to let my app access it?
00:31 <****> NetEffect: You can test the path with telnet desthost 3306
00:32 <****> mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini" and i have to run this line right?
00:32 <****> NetEffect: Check to see there's a listener on port 3306.
00:32 <****> listener? hmm
00:33 <****> Xgc - I think I'll just use my current output, and parse it in C++ to get what I need out of it.
00:33 <****> Will probably be much simpler.
00:33 <****> jordn: That's fine.
00:33 <****> jordn: Given that the data is not exactly normalized, that's probably best.
00:34 <****> jordn: You could use CASE WHEN ... END in SQL.
00:34 <****> Hm
00:34 <****> Yeah, that's true
00:34 <****> hmm i don't have mysqld, i donwer if it's mysqld-nt.exe
00:34 <****> i wonder
00:38 <****> i have a westell dsl modem/router, then a vonage router, then my box
00:39 <****> what is the source netmask?
00:42 <****> Does any one know how far from final release is 5.1.x?
00:43 <****> am i forwarding tcp or udp?
00:53 <****> NetAffect, tcp
00:54 <****> ok
00:54 <****> i did heh
00:54 <****> it's not access my home db though :/
00:55 <****> What's your public ip address or hostname? You can pm me if you don't want it in public, I can to see if I can connect to your mysql server
00:55 <****> k
00:55 <****> is there like a strtotime() function
00:56 <****> i want to say ts + 6 hours without having to use php
00:56 <****> ts?
00:56 <****> i pmed it
00:56 <****> To me? I didn't get it.


Total 18 pages. You are browsing page 1/18.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last


Tutti i nuovi CAP Italiani. Come ottenere il database completo