| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13
Comments:
<0> edster: dynamic view, that is. <0> edster: Also, lose the php in your examples. That makes it hard to answer your sql questions. <0> edster: Don't you have MySQL 4.1 or above? <1> Xgc: yes on the mysql 4.1 <1> or above <1> I'm not sure what to say about dynamic views...I don't know honestly <0> edster: Ok. Then you have some strange error in syntax. Try removing the OUTER keyword. <0> I don't know off hand. The basic form looks ok. <1> will do...one sec <0> I'll look closer. <0> edster: Can you dump the create table statements for the ***ociated tables? That will make it easier to test. <1> Xgc: same error... I also have another query that uses "LEFT OUTER JOIN" and it works as expected... not using inline views on that query though <1> ok...working on the create table statements <0> edster: Just a shot in the dark. Try changing the q aliases so that they don't conflict. That should be fine as is, but just a guess. <0> edster: Post the create table statements. <0> It will probably be obvious once I can run this.
<0> The basic form seems fine. <2> can i have no p***word set on linux sysetm ? <1> Xgc: http://pastebin.com/529935 <0> chino[lap]: With respect to MySQL users, yes. <0> chino[lap]: If you mean linux users, you don't want to do that. <2> no <2> but how do i make an empty p***word ? <0> chino[lap]: Just GRANT access without specifying a p***word (identified by clause) <0> edster: The error I see indicates a real issue with mixing aggregates and non-aggregate without a GROUP BY. <0> edster: You don't want to do that. <0> edster: Why are there no GROUP BY clauses? <2> for root ? <1> Xgc: good question....maybe I deleted it by accident...looking <0> chino[lap]: For any GRANT you create. You probably don't want to do this for root. <2> yes only local access laptop development <0> edster: The query is accepted with the proper GROUP BY clauses. <1> Xgc: I checked my logs...the oracle guy didn't include a group by... he must of forgot..he included them on other queries <0> edster: GROUP BY q.questionid -- in each of the dynamic views. <1> Xgc: that was my next question :D <0> edster: You know those Oracle guys. <1> I'll make sure to tell him that <1> :D <0> Can't trust them. Oh wait. That's me too. <1> heh <0> The standard term for dynamic view is derived table. <1> Xgc: the group by goes after the ON portion correct? <1> in 2 places <0> GROUP BY q.questionid) AS aa <0> GROUP BY q.questionid) AS na <0> Those are the two cases. <2> how do i grant rights to a database to the user test <1> i c <2> how do i set no p***word for root? <1> Xgc: http://pastebin.com/529946 same problem it seems <3> that doesn't sound so wise.. <0> chino[lap]: http://dev.mysql.com/doc/refman/5.0/en/grant.html <0> Ooops. <0> edster: That's not correct. Don't add any ()'s. Just insert the GROUP BY inside the existing ) prior to the AS aa and na alias. <4> hey Xgc <4> i tried it your way <0> l008com: Hey. <4> and what i'm getting is <4> it only counts one part, if there are more than one <0> edster: Like this. http://pastebin.com/529949 <4> Xgc here is my query: <4> http://pastebin.com/529950 <0> l008com: You have a some problems. Without data, I can't do much. <4> would you like me to give you some data? <0> l008com: A dump of the create table statements and insert statements that show the behavior. <0> l008com: I don't like your use of group by. That is probably the issue. <4> in the main query or the subs? <0> l008com: Both. <5> is there any way to use variable variables in MS Access? <0> kestaswork: Wrong channel. <4> yeah, really wrong <4> :-) <5> Xgc: there is no MS Access channel <4> don't you have to pay ms for help with ms access? <6> hello, any developer online? <7> is something wrong with this: $query = "INSERT into 00users (name) values ('$username')"; <7> i also tried it without the single quotes around the var name
<5> Melbell: theres nothing wrong with the syntax <5> (an error message might be helpful) <7> kestaswork: how do i see the error message? <0> Melbell: There's no way to know. You have php or other language details that could interfere. <1> Xgc: http://pastebin.com/529953 copied/pasted your post; same error <5> Melbell: mysql_last_error() or something, google it <4> Xgc i tried skipping the group bys and my results are all over the place <5> 1008com: not sure, hope not <5> I dont think MS support helps with stuff like this <1> Melbell: something like this - mysql_query( $query, $connection ) or die( mysql_error() ); <0> edster: It executes fine for me. <1> Xgc: thats what I was afraid of :P <1> well thats good news in one way <1> which version of mysql are you running? <4> Xgc here is the table structure of the two relevant tables <4> http://pastebin.com/529955 <0> edster: 5.0.4 beta <4> jobs_items.kind is an integer, either 1, 2 or 3; 1 being a part, 2 being a labor item, and 3 being a misc item <1> Xgc: whats the lowest mysql version you think I should have in order for that query to work? <0> edster: 4.1 <1> Xgc: I double check on my end <0> l008com: Is data coming? <7> I can't get it to print the error <4> ack it wasnt know <4> ummmm <4> hold on <4> i think my probem is the sub queries <4> i think i need to group by job, not id <4> ok yeah that seems to have done it <4> the id in the jobs_items is unique, the jobs_items.job is the unique number of the job itself <7> oh i'm stupid...(trying something else) <7> aha!! Duplicate entry '0' for key 1 <0> l008com: It helps to group by something appropriate. <4> agreed <4> its so nice to need help and actually GET IT <4> ;-) and yes that was a shot at #php <4> :-P <7> how do i make my insert query autoincrement the ID field? <0> Melbell: Use an auto-increment column. <7> omg duh, i KNOW i created that field with autoincrement..i must have turned it off later (i feel stupid) <7> thanks for your help guys <7> l008com: #php didn't help me either <0> Melbell: No problem. <4> its good if your question is something along the lines of "can someone direct me to the online php documentation" <0> We encourage visiting the documentation too. <4> docs are good, no doubt about it <4> but <4> well you know what i'm bitching about, no need to keep ranting <4> now i have a web site that works, which means i have work to do!!!!! <4> thanks!!!!!!!!!!! <4> and my query is almost up to a kilbyte <4> kilobyte <4> sooo close <8> what? <4> the query that i've been troubling over for 3 days <8> it's a kilobyte in size? <4> it was ~850 bytes but now its up to almost a kilobyte <1> Xgc: In case you goto bed...I want to say THANKS!!! I'm still investigating whats wrong on my end, but at least I know it works, and that narrows it down... again, THANKS! <4> the query string, not the result :-) <8> what does it do? <6> can i index a field with a function like old databases? <6> like: create index index_name on table_name ( md5(field) ) <0> edster: You're quite welcome. <1> and I'll tell my friend about the group bys ;P <4> firewire it selects all the jobs, and all the customers that belong to each job, and it sums up all the costs of parts , labor, misc, and total for each job <4> optionally limited by client and by timeframe <8> sounds like you have a bad schema <0> l008com: Let me know when your queries near 300 lines or more. Those tend to become interesting. <4> schema rocks, sometimes there is just a lot to do <4> i have one that selects items based on distance that it calculates between zip codes, using a lon lat lookup table. That one is fun, lots of trig in teh query <4> its probably no longer than this one though <4> not 300 lines
Return to
#mysql or Go to some related
logs:
#perl #osdev #gentoo emerge package that provides libgl burn .dmg k3b #perl #php MYSQL_OPT_RECONNECT mysql_options ubuntu could not open the device file /dev/nvidiactl PVR-TV 713X+linux
|
|