Jump to content

0o0o0

Members
  • Posts

    88
  • Joined

  • Last visited

Everything posted by 0o0o0

  1. yep sql beats it hands down .. thanks all!
  2. your xy is kinda freaky.. 9 hours.. waiting otday.. and well. ya its half done once I sorted by name 5 mins lol.. but I still want the sql answer. ----- Hey thanks Jacques1!
  3. honestly... Im using excel and i5 laptop, and its all a P.O.S. I have 400,000 rows and i simply want all the names to have the number of games played at the end of every row... I started it at 8:30am.. its now 3:06pm... so I was messing around and threw the list into a database and its a hell of alot faster.. So my plan let sql do the calcs quicker.. export back to excel.. voilia. sorting simpler. but ah! since you asked me this.. maybe sorting the excel sheet by names then doing the calcs is faster.. thx. as for the question above im still looking for an answer.
  4. I have a table.. explain this as quick as I can.. ok .. you all know what this does correct? select playerref, count(playerref) as gamesplayed FROM contest group by playerref say I have 51 rows.. Joe is 50 of them. and 1 row is pete.. the above will return two rows as the result.. one joe 50 one pete 1 what im trying to do is keep all 51 rows.. but at the ends is a new column in all joes 50 rows, in this new column it shows 50 and the last row it shows one row pete 1 Basically I want the count in a new column at the end of every row. possible? thanks anyone who can help.
  5. well its pretty safe to say "Barand" has taught me everything I know in sql and php. thanks again!
  6. What does one use to make this from 2 weeks to 1 month ago? This is now till a month ago ( in days) WHERE date > DATE_SUB(NOW(), INTERVAL 1 MONTH) How do you change NOW() to 14 days ago, INTERVAL 1 MONTH WHERE date > DATE_SUB(NOW(), INTERVAL 1 MONTH) tried... - 14 14 DAY 14 DAYS - 14 ) NOW(-14) NOW() - 14 Nothing on the net i found in roughly 60 searches matched anything ive tried to do. So... basically find everything in the db from 14 days ago.. to 1 month ago. on going rolling day to day.. I mean everyday no solid dates used the query.. so in 14 days from now (MAR 4) it would show Feb 19 (todays entires) to jan 19th Thanks.
  7. An Organized approach! thankyou.
  8. lol can I just go into my plumbing table, and add a row.. that always inputs PLUMBING in that last row automatically. simply put, without all the yammer lol.... is it possible?
  9. Lets do this another way.. say you have 3 identically structured tables.. except ones for plumbing, ones for electrical ones for say carpentry now eventually you want to create another table called. ALL So you would dump table 1 (plumbing) table 2 (electrical) table 3 (carpentry) into ALL... by cron at the end of everyday in the future.. You would have a table with all the tables info, except no real understanding of which row is plumbing, electrical or carpentry. So .. what i trying to find on the net, which I havent found yet.. is every time I put an entry into plumbing.. i do the usual.. but is there a way to create something like what TIMESTAMP row does.. but its just the word "PLUMBING" automatically in a row.. when I hit save. In that table forever.. same for adding an entry into electrical, the last row ( I will add to all tables when I find out if this is capable) the last row will automatically enter ELECTRICAL. get me? I know I sound LAAAAAZY.. lol but eventually adding the word "plumbing" to the last row in plumbing table every single time.. tedious. So.. now down the road, I dump all 3 tables into ALL table.. and I can then grab all plumbing when needed or all electrical, or plumbing and electrical without carpentry etc etc.. Or am im outdated? and theres a way to dump tables and insert which table they came from in the process of dumping the three tables into the "ALL" table. ( im not using "ALL" as a table name, its just for explanation here) Even if I wanted to just spit out the entire all 3 databases on an webpage as it stands now.... they COULD say plumbing , electrical, carpentry on them.. but it still wouldnt have it in the last row in the tables.
  10. Two questions.. I have two tables.. one plumbing, one flooring. To see the list on a browser I created php and html.. all good. one for plumbing one for flooring. now today I want to COMBINE the two on one page.. so I did... but to the viewer they see a list and cannot tell whether a line is plumbing or flooring unless they read the details. I would like the ending to state PLUMBING, or to state FLOORING.. for quick reference. So the two questions.. how does one make a column in their table lets call it "Jobtype" to always add the word "PLUMBING " when an entry is inputted.. ( kind of like how timestamp stamps the time without any manual input) second question maybe easier than messing with my tables. If you had such setup like ive explained how would you php program to post PLUMBING if the line came from plumbing table, and post FLOORING if the next 2 lines were from flooring, and the next 4 lines say ( any number ) to post PLUMBING ... other than simply having $jobtype, if the tables werent done like question one. todays been pretty hazy so I came to the forums for a little brain wake up
  11. I had it right 3 hours ago... duh.. It was OUTSIDE the foreach limit on the page.... maaaaan anyhow thanks for the reply.
  12. Did this a long time ago, and forget hoe to do it today.. searched the net for an hour no answers.. In simple php dom parser I need the coding for getting the element or tags name.. <div class="at_result" source="1215" category="24980966"> like category ... I need 24980966 <--- need that number.. tried $item['ID'] = $article->find('category')->innertext; tried $item['ID'] = $article->find('category')->outertext; tried $item['ID'] = $article->find('category')->plaintext; tried $item['ID'] = $article->find('div.category')->plaintext; I forget whats needed. so it will parse out the "24980966" for me. anyone? next page could be <div class="at_result" source="1215" category="34382966"> etc etc.. thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.