Jump to content

iwpg

Members
  • Posts

    59
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

iwpg's Achievements

Member

Member (2/5)

0

Reputation

  1. Thank you Barand, this is a great solution. Problem solved. I certainly appreciate it!
  2. Hi Benanamen, I need this data to use with highCharts.js, and will plot the data by month. So for example: 2016-05 Revenue: $20 2016-08 Revenue: $10 2016-11 Revenue: $50 How can I populate the empty data where no month exists in between? To chart this out in a way that makes sense, I need this: 2016-05 Revenue: $20 2016-06 Revenue: $0 2016-07 Revenue: $0 2016-08 Revenue: $10 2016-09 Revenue: $0 2016-10 Revenue: $0 2016-11 Revenue: $50 2016-12 Revenue: $0 // This month, or months after last pulled record up until now The records are coming from traffic to a website. There are 350,000 original database rows for traffic sources. I am trying to collect archived info on a monthly level. I hope that this clarifies my original post. 2016-05 Revenue: $20
  3. I have several hundred thousand records that will add a monthly db row if new data exists. I plan on working this info into a chart, but I see no reason to add values that contain 0. For 350,000 records, doing it this way reduces new monthly records to about 8,500, vs 350,000 - a huge performance improvement if this is possible. I figured that an array will help solve this. For example, looping over the data in SQL, will return something like: while ($r = $result->fetch_assoc()){ $id[] = $r["id"]; $revenue[] = $r["revenue"]; // Revenue for example $date[] = $r["date"]; // 2016-07 } So, the result will have the dates, id's and revenue stored as an array. Using ksort() will sort the dates, however is there a plausible way to add missing dates (that have 0 values)? Sorry for not being more clear, this is the best way I could describe this. I thank you for your help. DB storage is limited and expensive, and this is a critical step on the long term project.
  4. Thank you for your help, this gives me some nice direction.
  5. Sorry, I have another one as well. {"field25":["0"],"field26":["2"]} I would imagine a preg_split. I basically need to access field25 and field26 values, and turn all of them into variables. This data has me scratching my head, any help is very much appreciated.
  6. I am using a jevents plugin, RSVP pro, and am trying to access "custom_rsvp_capacity" that has a value in this case of 55. Not sure where to start, since this is not a typical set of data. Thank you. Raw: a:45:{s:3:"UID";s:32:"c0c158647d172fafbe9bb23b48b";s:11:"X-EXTRAINFO";s:0:"";s:8:"LOCATION";s:1:"8";s:11:"allDayEvent";s:3:"off";s:7:"CONTACT";s:0:"";s:11:"DESCRIPTION";s:1096:"Discovery Center";s:12:"publish_down";s:8:"2016-9-1";s:10:"publish_up";s:8:"2016-9-1";s:13:"publish_down2";s:8:"2016-9-1";s:11:"publish_up2";s:8:"2016-9-1";s:7:"SUMMARY";s:17:"Falls";s:3:"URL";s:0:"";s:11:"X-CREATEDBY";i:1135;s:7:"DTSTART";i:1472738400;s:5:"DTEND";i:1472745600;s:5:"RRULE";a:5:{s:4:"FREQ";s:4:"none";s:5:"COUNT";i:1;s:8:"INTERVAL";s:1:"1";s:14:"IRREGULARDATES";a:0:{}s:5:"BYDAY";s:24:"+1TH,+2TH,+3TH,+4TH,+5TH";}s:8:"MULTIDAY";s:1:"1";s:9:"NOENDTIME";s:1:"0";s:7:"X-COLOR";s:0:"";s:9:"LOCKEVENT";s:1:"0";s:20:"custom_upload_image1";s:28:"57bc596ab96872.78000912.jpeg";s:26:"custom_upload_image1_title";s:26:"image-coming-soon-comp.png";s:19:"custom_upload_file1";s:0:"";s:25:"custom_upload_file1_title";s:0:"";s:16:"custom_rsvp_evid";s:2:"13";s:29:"custom_rsvp_allowregistration";s:1:"1";s:18:"custom_rsvp_params";s:0:"";s:25:"custom_rsvp_sessionaccess";s:2:"-1";s:32:"custom_rsvp_sessionaccessmessage";s:0:"";s:20:"custom_rsvp_capacity";s:2:"55";s:27:"custom_rsvp_waitingcapacity";s:1:"0";s:20:"custom_rsvp_template";s:2:"15";s:29:"custom_rsvp_allowcancellation";s:1:"0";s:24:"custom_rsvp_allowchanges";s:1:"0";s:22:"custom_rsvp_allrepeats";s:1:"1";s:25:"custom_rsvp_showattendees";s:1:"3";s:23:"custom_rsvp_attendintro";s:118:" Total number";s:19:"custom_rsvp_regopen";s:19:"2016-08-22 12:00:00";s:20:"custom_rsvp_regclose";s:19:"2016-08-30 12:00:00";s:23:"custom_rsvp_cancelclose";s:19:"2016-09-01 10:00:00";s:26:"custom_rsvp_allowreminders";s:1:"1";s:28:"custom_rsvp_remindallrepeats";s:1:"1";s:26:"custom_rsvp_remindernotice";s:2:"24";s:27:"custom_rsvp_remindersubject";s:49:"Event Reminder : {EVENT} ON {DATE}%d %B %Y{/DATE}";s:27:"custom_rsvp_remindermessage";s:175:"Reminder template";}
  7. I am getting indexed by Google for URLs that are not linked. My worry is that this will be considered duplicate pages. Cannot find any info on rewriting numerous = signs. I would buy you a few beers if I could for the help. Thank you. Example: http://www.site.com/?rs=20&n=750====&deviate=30 needs to be this: http://www.site.com/?rs=20&n=750&deviate=30
  8. Sounds like a plan, will do. My original thinking was that regex would be faster than parse_url based on some past experiences. Thank you!
  9. Hello, I am trying to replace a url and add a sub-id to it, however I'm not quite there. Any help is always appreciated here. In the end, I would like the value of gotoUrl to have the cpId 123abc45 attached to it. I.E. http://example.com/?Aff=56732&SID=123abc45 http://example.com/?Aff=56732&uv=123abc45&product=1834234 http://example.com/?Aff=56732&cid=123abc45&ace=2gs244s3 $gotoUrl = "http://example.com/?Aff=56732&SID="; // OR could be listed as such: // $gotoUrl = "http://example.com/?Aff=56732&uv=default&product=1834234"; // $gotoUrl = "http://example.com/?Aff=56732&cid=&ace=2gs244s3"; // Will attach this to replace value $cpId = "123abc45"; // Possible sid replacements, depending on the url $sidList = array("sid","SID","cid","uv"); if ($gotoUrl){ foreach($sidList as $sidVar){ if (preg_match("/$sidVar/i", $gotoUrl)){ $gotoUrl = preg_replace("#{$sidVar}(?=.*\d)(?=.*[a-z])(?=.*[A-Z])$#", "{$sidVar}={$cpId}", $gotoUrl); } } echo $gotoUrl; }
  10. Works perfect, also added ksort() to the arrays to get them back in order.
  11. I went through the array manuals first at php.net. Didn't catch this one. Thanks for helping me out, I truly appreciate it! Mike
  12. I am seeing it, on Chrome, FF, IE. It could be a CSS file? Sorry I couldn't help.
  13. I'm starting to come to thoughts of a conclusion. Would it be feasible to check the first and last dates of each array, iterate through the range and then check it with strtotime + 1 month?
  14. I don't think that this would have anything to do with it, but value="Update" has a space after =. Also, you can remove the loop since it's just one record. <div id="editProvider" class="modalEdit"> <div> <a href="#close" title="Close" class="close">X</a> <p>Current Provider for: <?php $row = mysqli_fetch_array($result); echo $row['firstname'] ." " . $row['lastname'] . " is " . $row['assignedcounselor'] . "<br>"; ?> <p>Select a New Provider"; <form action="editClient.php" method="post"> <select name="assignedCounselor"> <option value="Dr. Dolittle">Dr. DoLittle</option> <option value="Mr. Magoo">Mr. Magoo</option> <option value="Jerry Atric">Jerry Atric</option> <option value="Sheldon Cooper">Sheldon Cooper</option> </select> <input type="submit" value="Update"> </form> </p> </p> </div> </div>
  15. The code that you are using should work with ID's. I highly recommend using this for any type of match. If you don't already have an ID associated with tournaments, use auto increment when creating it. echo "<td><a href='tournament.php?id=".$info['id']."'>" . $info['tournament'] . "</a></td>"; $tournamentId = $_GET['id']; $data = mysql_query("SELECT team1,score1,team2,score2 FROM smite where tournament='$tournamentId' LIMIT 1;") or die(mysql_error());
×
×
  • 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.