Jump to content

Matrixkid

Members
  • Posts

    57
  • Joined

  • Last visited

Everything posted by Matrixkid

  1. its still giving me the lower numbers
  2. Hi there, I am having trouble getting the results I want from a mysql query. I have this data: Basically from this data I want the highest value in the 2nd column, so my desired results would be: Elite Madac | 427 | 100 Elite Sabre | 512 | 110 Instead, I get this: This is my sql query: SELECT idName,max(idAttacks),max(idPoints) FROM stats GROUP BY idName ORDER BY max(idPoints) DESC Thanks for the help! Cheers
  3. for example, if i wanted to see jim's points for the 2008-08-12, i would take the points from the 2008-08-12 and minus the ones from 2008-08-11 the numbers are running totals, not the # themselves, i am trying to get the daily numbers from the running total. so jims points would be 2, bobs would be 10 - for 2008-08-12
  4. Howzat goin? Im running into some trouble with comparing some data. Ill try my best to describe the problem, feel free to ask any further questions if necessary. I have a table like this: iName | iPoints | iAttacks | iDate Bob | 25 | 15 | 2008-08-12 Jim | 20 | 13 | 2008-08-12 Bob | 15 | 10 | 2008-08-11 Jim | 18 | 10 | 2008-08-11 What I am trying to do is get a daily update on how many points and attacks each person made. From the example, on the 12th, you can do this by taking the 12th data and minus the 11th. I have got the 12th information displaying total points with a while loop but I am having trouble taking the information from the 11th to minus it. I am trying this: //data from the 12th is in $result while($info = mysql_fetch_array( $result )) { //$selectDay is the 12th. $basedate = strtotime($selectDay); $date1 = strtotime("-1 day",$basedate); $yDate = date("Y-m-d", $date1); //get data from the 11th, with idName equal to current 12th name. $yQuery = "SELECT * FROM stats WHERE (idDate='".$yDate."') AND (idName='".$info['idName'].")"; $yResult = mysql_query($yQuery); while ($yinfo = mysql_fetch_array ( $yResult )) { Its not giving me the results that I want. Is there another method in doing this? thanks for your help, it is very much appreciated.
  5. /Sport:([^*]*)Team:/i solved. took me tons of time. I suggest to anyone looking for a quick way of figuring this stuff out to use Expresso. Great tool. heres a preview shot of my problem in expresso:
  6. If it helps, it could also be between: Sport: Team: ex: array ('[sport:.*?.Team:]') array ('[sport:].*?.[Team:]') Thanks
  7. Ive been trying for sometime now to replace everything between the following: nbsp; Sport nbsp; Team I need everything replaced between those two. I have tried: ([nbsp; Sport](.*?)[nbsp; Team]); (nbsp; Sport.*?.nbsp; Team); those were the main two, just different variants of each. Anything would help at this points. Thanks in advance! Cheers
×
×
  • 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.