| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11
Comments:
<0> I've saved this. I have to run out for a little bit. <1> ok <1> thanks for looking at it <2> punkstar: working out a few kinks ... just FYI, but that was some speedy code writing you did :P :D <3> I would have done it much faster If I had my database cl*** work there, using core functions is really slow. <3> writing I mean, like mysql_query() and schtuff. <3> Thats $500 please <3> :P, joookes. <4> Heya folks
<5> I have a customer table, and I have a phone table for the customers phone numbers, not all customers have phone numbers, is there a way in sql where I can get records from the customer table that do not have phone numbers stored in the phone table? <2> my main concern is the speed of making so many queries, which is what sent me on this path for the "one" sql statement <4> I have 7 fields .. a tinyint for each day of the week, it's 1 or 0 .. meaning match for that day. Is there a simple way to match all 6 fields? <3> Thats where I can't help. I am totally ****E at big queries. <6> marcz908, SELECT a.customer_name FROM customers AS a LEFT JOIN phone_numbers AS b ON a.customer_id = b.customer_id WHERE b.customer_id IS NULL <2> <- same <4> I frequently write 50+ line queries, you just gotta manage 'em piece by piece <3> I am doing Zend Cert for PHP sometime this year <3> and I want to do get a MySQL Professional Cert too. <3> Thats why i am here.. TEACH ME! =D <5> thanks will! <3> I've used MySQL for years, but I dont know how big its memory foot print and stuff is! <2> haha... well I'm a java programmer (J2SE, J2EE)...we have dba's for these queries :-p <3> Java. Totally Sweet. Gotta pick that up. I need a kind of non-web language <2> doing a side project and the queries are now on me <5> will: will that work if there is not a matching row in the phone_numbers table? for example, I might have 10 customer rows, and 3 phone rows, I don't have 3 phone rows with phone numbers and 7 phone rows with the phone number as NULL <3> Sweet. What field of work are you in? <3> I'm 17 now, and I am trying to find a decent thing to look for. <2> punkstar: if( mysql_num_rows( $dosql2 ) == 1 ) I'm getting the following error: mysql_num_rows(): supplied argument is not a valid MySQL result resource <2> not sure why...looks correct <3> echo $dosql2; <3> Whats it show you? <6> marcz908, Don't use NULL in the phone number table. If there are no phone numbers, there shouldn't be any rows to begin with. <6> edster, Means the query is not valid. <6> punkstar, Don't echo a resource id... <3> im finding out if its a resource. <6> Why not just check the query??? :P <3> Coz I made the query and it looked fine! :P <6> You can safely ***ume that it is NOT a resource. <6> punkstar, It ain't. So use mysql_error() <2> Array ( [1] => Array ( [0] => question [1] => answer_count [2] => answer_unread [question] =>
<2> ... <3> garr.. pastebin dood. <2> heh <2> I thought that was good enough <3> haha, i know whats wrong <3> pastebin and I'll remove it.. so stupid of me. <3> Declared array values not keys <2> http://pastebin.com/529406 <2> paste the code portion? <3> not that :P, the whole code! <3> or my bit atleast. <2> whats wrong.....I'd like to know :) <3> $final[$result['questionID']] = array("question","answer_count","answer_unread");, remove that <3> its declaring values not keys <2> same error : http://pastebin.com/529420 <2> oops <2> one sec...it might be my mistake : <2> :/ <3> echo the value of $sql2 out so we can seeit. <2> one sec... the column names I put in my original posts were modified to hopefully make more sense <3> haha, thats what it is <2> :p <2> punkstar: seems to do the trick...much thanks... I'm still going to pursue less sql statements...hopefully 1 like Xgc seems to know how to write <3> Yeah, thats cool. <3> Atleast you have something to fall back on eh? :P <2> well I'm learning as I go <3> sweet. <2> its always nice to see how someone would implement it <2> I'm sure I can learn from some things you did <2> I'm happy to see I was kinda on the same page with mysql_fetch_***oc <3> Well that how I would have tackled it, but not with that code.. because I have my own cl*** to beef it up.. but the only reason I would have done it that way is because I don't know how to do it any other way I guess. <2> totally understandable <2> its good work! <2> if you are around when I finalize everything...I'll post it to you <3> Ha. I gotta go, i think I have a Physics, Computing, Maths and Economics paper by tomorrow :| <2> fun fun <2> tks again <3> peace
Return to
#mysql or Go to some related
logs:
rhel4 kernel init/main.o #asm javascript onrightclick how to enable su in ubuntu #debian SUSE kotd 2.6.17 Call to undefined function ldap_start_tls() suse Call to undefined function: pma_generate_common_url() in #kde #math
|
|