Jump to content

dmirsch

Members
  • Posts

    65
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://www.designsbydaina.com

Profile Information

  • Gender
    Female
  • Location
    Duluth, Minnesota

dmirsch's Achievements

Member

Member (2/5)

0

Reputation

  1. OK, thanks requinix! Duh! data is missing on the last record. For some reason, I thought it was just remming out the last record....no issue here, but my own failure to check the data. Lesson Learned!
  2. I have created PHP coding that pulls records from a MySQL database. It works fine, EXCEPT that it does not display the last person's position (acronym) and name (officer). It does however pull the chapters for that person. Here is the webpage where it is displayed: http://mnwt.org/exec-council/execcouncil_dd-home.php Please help me figure it out. Here is the coding: <table align="center" width="100%"><tr> <?php $Query = "SELECT * FROM execCouncil LEFT JOIN positions ON execCouncil.acronym = positions.acronym WHERE execCouncil.endDate > now() AND positions.pos ='DD' ORDER BY execCouncil.ecID"; $Result = mysqli_query($DB,$Query); $NumResults = mysqli_num_rows($Result); $c = 0; // Our counter $n = 2; // Each Nth iteration would be a new table row while ($Row = mysqli_fetch_assoc($Result)){ if($c % $n == 0 && $c != 0 && $Row['acronym'] != 'PRES') // If $c is divisible by $n... { // New table row echo '</tr><tr>'; } $c++; if ($Row['acronym']!='CSC'){ echo '<td width="50%" valign="top">'; if ($Row['photo'] != NULL){ echo '<h2>'.$Row['title'].': <a href="mailto:'.strtolower($Row['emailAddress']).'">'.$Row['officer'].'</a></h2>'; echo '<img src="/images/exec-council/'.strtolower($Row['acronym']).'.jpg" alt="'.$Row['officer'].', '.$Row['title'].'" title="'.$Row['officer'].', '.$Row['title'].'" width="100" align="left" />'; } $dDirector = $Row['officer']; } ?> <?php echo '<blockquote><blockquote><ul>'; $chptrQuery = "SELECT * FROM chapters LEFT JOIN execCouncil ON chapters.districtNumber = execCouncil.acronym WHERE execCouncil.officer='$dDirector' ORDER BY execCouncil.acronym, chapters.wtChapter"; $chptrResult = mysqli_query($DB,$chptrQuery); $chptrNumResults = mysqli_num_rows($chptrResult); while ($chptrRow = mysqli_fetch_assoc($chptrResult)){ echo '<li>'.$chptrRow['wtChapter']; if ($chptrRow['websiteURL'] != NULL){ echo '<a href="'.$chptrRow['websiteURL'].'" target="_blank"><img src="/images/icons/website.gif" alt="'.$chptrRow['wtChapter'].' website" title="'.$chptrRow['wtChapter'].' website" width="10" border="0" align="top" /></a>'; } if ($chptrRow['facebookURL'] != NULL){ echo '<a href="'.$chptrRow['facebookURL'].'" target="_blank"><img src="/images/icons/facebook.png" alt="'.$chptrRow['wtChapter'].' Facebook page" title="'.$chptrRow['wtChapter'].' Facebook page" width="10" border="0" align="top" /></a>'; } echo '</li>'; } echo '</ul></blockquote></blockquote>'; } echo '</td>'; ?> <td width="50%" height="0" align="center"><a href="/pdfs/officers/cob_DistrictMap.pdf" target="_blank"><img src="/images/exec-council/stuff4site/2013DistrictMap.gif" alt="2013 District Map" title="2013 District Map" height="150" border="0" /></a></td></tr></table>
  3. YEAH! Thanks -- that worked, but can you now tell my why "1814400"?
  4. I have the following code: //DETERMINES ASL POLICY if ($perfRow['ASL']=='ToArrange'){ $ASLdate = $perfRow['startDateTime']; $ASLconfirm = strtotime($ASLdate-'21 days'); echo "<!--[ASL=ToARRANGE--><p>An ASL Interpreted performance of this event is offered on".date("l, F j",strtotime($perfRow['startDateTime']))." at ".date("g:i a",strtotime($perfRow['startDateTime'])).".<br />Please contact me by ".date("l, F j",strtotime($ASLconfirm))." to confirm this service.</p>"; } What I need is that if the ASL is "To be Arranged" there is a date that lists for $ASLconfirm that is three weeks prior to $ASLdate. The code above gives me the following: As you can see from the output the December date is NOT three weeks prior to the September date. Where did I go wrong in my coding?
  5. Thank you PFMaBiSmAd, I made the changes you suggested. I think you've also helped me before! I very much appreciate your help!
  6. THANK YOU Pikachu2000!!! I think you've helped me before! I very much appreciate your help!
  7. When I removed the variable from the SQL query and replace it with a value, the PHP code works fine. So maybe it's not a PHP issue. What I am trying to do is use the variable that was picked and shows up in my URL and my $_GET statement as demonstrated on my sample page. Once I put the variable into the SQL query that is when I get the error message. Perhaps I am putting that into the SQL query wrong. However, when I put the SQL with the variable into my phpMyAdmin page, it does not produce an error. Also darkfreaks suggested I use a different mysqli statement, but I'm not sure where to place it. I tried to put that into instead of the mysqli_num_rows, but I still get the same error.
  8. I have a template page that opens with a GO click from a drop-down in a different page. The variable is being passed through to the URL and in the GET statement. However, my PHP code is producing the following error: . Here is my code: <?php //Assigns the venueCode tothe variable with a more convenient name $venueURL = $_GET['VenueCode']; @$DB = mysqli_connect('server','username','password','database'); if (mysqli_connect_errno()){ echo '</blockquote><br/><br /> Sorry, this webpage is temporarily unavailable.<br /> <a href="http://alaskapac.centertix.net/">Click here to search for events.</a>'; } else { ?> <?php $Query = "SELECT Events.EventTitle, DATE_FORMAT(Performance.startDateTime, '%W, %M %e, %Y') AS startDate, DATE_FORMAT(Performance.startDateTime, '%h:%i %p') AS startTime, Events.EventID, Events.thumb, Events.ShoWareEventLink, Events.tagline, Performance.category_id, Promoters.Presenter, Promoters.website, Events.startDATE, Events.endDATE, Events.EventOnSaleDate, venues.VenueName FROM ((Events LEFT JOIN Performance ON Events.EventID = Performance.EventID) LEFT JOIN Promoters ON Events.PromoterCode = Promoters.PromoterCode) LEFT JOIN venues ON Performance.VenueCode = venues.VenueCode WHERE venues.VenueCode=".$venueURL." AND Events.group_id=1 AND Performance.category_id!=2 AND Performance.category_id!=5 AND Performance.category_id!=7 AND Performance.category_id!=8 AND Events.EventOnSaleDate IS NOT NULL AND (Performance.PerfType='Public Event' OR Events.EventID='79') AND Performance.endDateTime >= now()-INTERVAL 1 DAY AND Events.PublishDate <= now() AND Events.startDATE IS NOT NULL ORDER BY Performance.startDateTime"; $Result = mysqli_query($DB,$Query); $NumResults = mysqli_num_rows($Result); ?> <?php if($NumResults=0){ echo "<p class='submenu'>$NumResults Performances</p>"; } while ($Row = mysqli_fetch_assoc($Result)){ $eventtitle = $Row['EventTitle']; $eventDate = $Row['startDate']; echo '<p><a href="' . $Row['ShoWareEventLink'] . '"><img src="https://alaskapac.centertix.net/UPLImage/' . $Row['thumb'] . '" alt="' . $Row['EventTitle'] . '" title="' . $Row['EventTitle'] . '" align="left" border="0"><span class="Heading3_blue">' . $Row['EventTitle'] . '</span>'; if($Row['FreeEvents']==TRUE){ echo '<img src="/images/free.gif" alt="Free Event" title="Free Event" width="80" height="80" align="right" border="0"></a><br />'; } elseif ($Row['EventOnSaleDate'] <= date("Y-m-d g:i a")){ /** IF ONSALEDATE<=NOW**/ echo '<img src="/images/logos/ctx/BUY_Tickets_gold.gif" alt="Buy Tickets" title="Buy Tickets" width="85" height="32" align="right" border="0"></a><br />'; } else {/** IF ONSALEDATE!<NOW**/ echo '<img src="/images/logos/ctx/AvailableSoon.png" alt="Available Soon" title="Available Soon" align="right" border="0"></a><br /><i>Tickets available ' . date("l, F j, Y", strtotime($Row['EventOnSaleDate'])) . ' at ' . date("g:i a", strtotime($Row['EventOnSaleDate'])) . '.</i>'; /** +ONSALEDATE **/ } echo '<br />Presented by <a href="' . $Row['website'] .'" target="_blank">' . $Row['Presenter'] . '</a>'; echo '<br />'.$Row['startDate']. ' at ' . $Row['startTime'].' - '.$Row['VenueName']; if ($Row['FreeEvents']==TRUE){ echo '<br /><br />'.$Row['BriefDescription']; } echo '<br /><br /></p><hr>'; } ?> <?php mysqli_free_result($Result); mysqli_close($DB); } ?> Here is my sample Results page: http://www.myalaskacenter.com/events/venues/test_venues-results.php?VenueCode=ACH
  9. Just so that everyone knows, I am not a Javascript person at all. I have narrowed down where I think the issue is in the script, but do not even know if that is correct as I do not understand the gobbly-gook at all. I looked over the Javascript books that were suggested, but I need a Javascript for Dummies manual I think. Anyway, if you would like me to enter the Javascript into this posting, I can do so. However, since I have no idea whatsoever if I'm even correct in my assumption of where the fix could be made, I thought it best not to enter all the 3 Javascript pages of coding that could potentially be affecting this issue.
  10. I have created a PHP file out of a WOWslider HTML page to pull events from my database and that works fine. However, what does not work is that the little thumbnail navigation at the top of the image carousel is repeating the first 3 images (if one line in Navigation) or 6 images (if two lines in navigation) for the last little thumbnails. I have narrowed this down to the fact that this is a Javascript error because it does not show up if I pull out all the Javascript. The link and hovertext is correct, it's just the image that is incorrect. The following are my examples: Image Carousel with one line in Navigation: http://www.myalaskacenter.com/homecarousel/homecarousel2.php Image Carousel with two lines in Navigation: http://www.myalaskacenter.com/homecarousel/homecarousel3.php Image Carousel with Javascript removed: http://www.myalaskacenter.com/homecarousel/junk.php Does anyone know how to make the nav_image appear correct?
  11. I need my code to generate the following HTML: div id="wowslider-container1"> <div class="ws_images"> <span><img src="https://alaskapac.centertix.net/UPLImage/aca_beauty.jpg" alt="Disney's Beauty & the Beast" title="Disney's Beauty & the Beast" id="wows0" /></span> <span><img src="https://alaskapac.centertix.net/UPLImage/ss_scaredscriptless.jpg" alt="Scared Scriptless" title="Scared Scriptless" id="wows1" /></span> <span><img src="https://alaskapac.centertix.net/UPLImage/aysc_worldcupofwines.jpg" alt="World Cup of Wines" title="World Cup of Wines" id="wows2" /></span> <span><img src="https://alaskapac.centertix.net/UPLImage/aso_outofthisworld.jpg" alt="Anchorage Symphony's Out of This World" title="Anchorage Symphony's Out of This World" id="wows3" /></span> <span><img src="https://alaskapac.centertix.net/UPLImage/aca_mikegarson.jpg" alt="Mike Garson" title="Mike Garson" id="wows4" /></span> <span><img src="https://alaskapac.centertix.net/UPLImage/ctc_pinkalicious.jpg" alt="Pinkalicious!" title="Pinkalicious!" id="wows5" /></span> <span><img src="https://alaskapac.centertix.net/UPLImage/aso_silentfilm.jpg" alt="Anchorage Symphony's Silent Film Double Feature" title="Anchorage Symphony's Silent Film Double Feature" id="wows6" /></span> <span><img src="https://alaskapac.centertix.net/UPLImage/aca_rockofages.jpg" alt="Rock of Ages" title="Rock of Ages" id="wows7" /></span> <span><img src="https://alaskapac.centertix.net/UPLImage/pdc_concert.jpg" alt="Pulse Dance Company in Concert" title="Pulse Dance Company in Concert" id="wows8" /></span> <span><img src="https://alaskapac.centertix.net/UPLImage/aca_mannheimsteamroller.jpg" alt="The Christmas Music of Mannheim Steamroller" title="The Christmas Music of Mannheim Steamroller" id="wows9" /></span> <span><img src="https://alaskapac.centertix.net/UPLImage/alex_zlatkovski.jpg" alt="Alexander Zlatkovski" title="Alexander Zlatkovski" id="wows10" /></span> <span><img src="https://alaskapac.centertix.net/UPLImage/wsp_joshritter.jpg" alt="Josh Ritter" title="Josh Ritter" id="wows11" /></span> <span><img src="https://alaskapac.centertix.net/UPLImage/z_acpa_giftcertificates.jpg" alt="Gift Certificates" title="Gift Certificates" id="wows12" /></span> <span><img src="https://alaskapac.centertix.net/UPLImage/adp_fireice.jpg" alt="New Year's Eve Celebration" title="New Year's Eve Celebration" id="wows13" /></span> </div><div class="ws_bullets"><div> <a href="#wows0" title="Disney's Beauty & the Beast"><img src="https://alaskapac.centertix.net/UPLImage/aca_beauty.jpg" alt="Disney's Beauty & the Beast" />1</a> <a href="#wows1" title="Scared Scriptless"><img src="https://alaskapac.centertix.net/UPLImage/ss_scaredscriptless.jpg" alt="Scared Scriptless" />2</a> <a href="#wows2" title="World Cup of Wines"><img src="https://alaskapac.centertix.net/UPLImage/aysc_worldcupofwines.jpg" alt="World Cup of Wines" />3</a> <a href="#wows3" title="Anchorage Symphony's Out of This World"><img src="https://alaskapac.centertix.net/UPLImage/aso_outofthisworld.jpg" alt="Anchorage Symphony's Out of This World" />4</a> <a href="#wows4" title="Mike Garson"><img src="https://alaskapac.centertix.net/UPLImage/aca_mikegarson.jpg" alt="Mike Garson" />5</a> <a href="#wows5" title="Pinkalicious!"><img src="https://alaskapac.centertix.net/UPLImage/ctc_pinkalicious.jpg" alt="Pinkalicious!" />6</a> <a href="#wows6" title="Anchorage Symphony's Silent Film Double Feature"><img src="https://alaskapac.centertix.net/UPLImage/aso_silentfilm.jpg" alt="Anchorage Symphony's Silent Film Double Feature" />7</a> <a href="#wows7" title="Rock of Ages"><img src="https://alaskapac.centertix.net/UPLImage/aca_rockofages.jpg" alt="Rock of Ages" />8</a> <a href="#wows8" title="Pulse Dance Company in Concert"><img src="https://alaskapac.centertix.net/UPLImage/pdc_concert.jpg" alt="Pulse Dance Company in Concert" />9</a> <a href="#wows9" title="The Christmas Music of Mannheim Steamroller"><img src="https://alaskapac.centertix.net/UPLImage/aca_mannheimsteamroller.jpg" alt="The Christmas Music of Mannheim Steamroller" />10</a> <a href="#wows10" title="Alexander Zlatkovski"><img src="https://alaskapac.centertix.net/UPLImage/alex_zlatkovski.jpg" alt="Alexander Zlatkovski" />11</a> <a href="#wows11" title="Josh Ritter"><img src="https://alaskapac.centertix.net/UPLImage/wsp_joshritter.jpg" alt="Josh Ritter" />12</a> <a href="#wows12" title="Gift Certificates"><img src="https://alaskapac.centertix.net/UPLImage/z_acpa_giftcertificates.jpg" alt="Gift Certificates" />13</a> <a href="#wows13" title="New Year's Eve Celebration"><img src="https://alaskapac.centertix.net/UPLImage/adp_fireice.jpg" alt="New Year's Eve Celebration" />14</a> </div></div> </div> So I assumed that it would be something similar to the following: while ($Row = mysqli_fetch_assoc($carouselResult)){ $EventName = $Row['EventTitle']; $image = $Row['eImage']; /* $big_image = LISTING OF ALL IMAGES */ $big_image = array('<span><img src="https://alaskapac.centertix.net/UPLImage/' . $image . '" alt="' . $EventName. '" title="' . $EventName . '" id="wows'. $i .'" /></span>'."\n"); $i2 = $i; $i = $i+1; /* $nav_image = TINY BOXES TO NAVIGATE THROUGHOUT CAROUSEL */ $nav_image = array('<a href="#wows' . $i2 . '" title="'.$EventName.'"><img src="https://alaskapac.centertix.net/UPLImage/' . $image . '" alt="' . $EventName. '" />'.$i.'</a>'."\n"); $i2 = $i2+1; } echo '<div id="wowslider-container1">'."\n".'<div class="ws_images">'."\n"; echo array($big_image); echo '</div><div class="ws_bullets"><div>'."\n"; echo array($nav_image); echo '</div></div>'."\n".'</div>'; But array($big_image) and array($nav_image) do not work as I expected and it just produces the following HTML code: <div id="wowslider-container1"> <div class="ws_images"> Array</div><div class="ws_bullets"><div> Array</div></div> </div> Can anyone help out a beginner in PHP?
  12. PFMaBiSmAd has helped me out with this and was very helpful. Now I need to step back one more time to the Marketing Category (i.e., Theatre vs Concert). So my listing would be: Marketing Category Event Title Performance Date & Venue Should I do the while code inside the while code?
  13. I am still attempting to use this code and now have found an issue on a different webpage. In the previous webpage, I hard coded the MainCategory. Now since there are more than just 4 MainCategories in the new webpage, I would like the coding to find them itself. In looking at the coding you supplied, I thought it would go under "output the heading/start a new section" but this does not allow it to show up. Here's the code: <?php //PROCEDURES $last_SUBcategory = NULL; // remember the last SUBcategory while ($Row = mysqli_fetch_assoc($Result)){ $SUBcategory = $Row['SUBcategory']; if($last_SUBcategory != $eventtitle){ // a new or the first SUBcategory was found if($last_SUBcategory != NULL){ // not the first SUBcategory, close out the previous section // code to close out the previous section goes here... (if your layout needs to do this) echo "</ul>"; echo '<hr /><hr />'; } $last_SUBcategory = $SUBcategory; // save the new EventTitle // output the heading/start a new section; code to output the heading goes here... echo '<h2>'.$Row['SUBcategory'].'</h2><ul>'; } //NEED A WHILE STATEMENT HERE TO SHOW EACH Item FOR THIS SUBcategory echo '<h3>'.$Row['Item'].'</h3>'; echo '<p>'; if ($Row['Attachment'] != NULL) { echo '<a href="/pdfs/coupons-promotions/"'. $Row['Attachment'] . ' target="_blank"><img src="http://www.myalaskacenter.com/images/logos/PDF.png" width="15px" height="15px" alt="Download PDF File" title="Download PDF File"> '.$Row['Attachment'].'</a>'; } if ($Row['Image'] != NULL) { echo ' <img src="/pdfs/coupons-promotions/'.$Row['Image'].'" width="40px" height="40px" alt="'. $Row['Item'] . '" title="'. $Row['Item'] . '"align="left">'; } echo $Row['Description']; //NEED TO CLOSE THE WHILE STATEMENT HERE TO SHOW EACH PERFORMANCE FOR THIS SUBcategory } // code to close out the last section goes here... (if your layout needs to do this) ?> In this case the MainCategory=SUBcategory, and they are not showing up -- see http://www.acpacenterstage.com/centertix-ticketsellers/knowledgebase-procedures.php for an example. PFMaBiSmAd, I am hoping you will help me out again since you were so instrumental in making this work last time! If someone else can give me the solution, I would be just as thankful, though
×
×
  • 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.