Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 1 of 1
  1. #1
    Senior Member whippetkid's Avatar
    Join Date
    May 2010
    Location
    Scotland
    Posts
    123
    Member #
    22044
    Hi,

    My php is very limited and I had a developer created a news page which archived on a monthly basis. I have an issue where the articles have stopped archiving for the last 2 months so neither June or July are showing, I am unable to contect my developer and really need to fix this issue, can nanybosy please help?

    Many thanks for looking

    ***NEWS/ARCHIVE PAGES***

    PHP Code:
         <?php
    $mon
    =$_REQUEST['mid'];
    $obj=new util();
    $sql="SELECT * FROM articles WHERE MONTH(date)='$mon' ORDER BY date DESC";
    $exe=mysql_query($sql);
    while(
    $rows=mysql_fetch_array($exe))
    {
    ?>
               <tr>
                   <td>
                        <?php $desc=stripslashes($rows['article']); ?>
                       <strong style="font-size:12px;"><?php echo($obj->date_time($rows['date']));?></strong>&nbsp;&nbsp;
    <div style="margin-right:20px;"><?php echo substr($desc,0,340);?>
    <?php 
    if($rows['article_id']==54) {  } else { ?> <br/> <?php ?>
                            <a href="read_more.php?nid=<?php echo($rows['article_id']);?>" style="color:#999; text-decoration:none;"><strong>Read More.</strong></a>
                            </div>
                    <br/>
                            </td>
                    </tr>
               <tr>
                   </td>
                    </tr>
                    <?php ?>
                </table>
          </div>
          <?php
     $mon_arr
    =array('January','February','March','April','May','June','July','August','September','October','November','December');
     
    $month=date('m');
     
    $qry="SELECT COUNT(article_id) total,MONTH(date) AS Mon,articles.* FROM articles WHERE MONTH(date)!='$month' GROUP BY MONTH(date)";
    $run=mysql_query($qry);
     
    ?>
           <div class="archive" id="archive">
    <!--        <h2>Archive</h2>
    -->       <?php
     
    while($data=mysql_fetch_array($run)) {
    ?>
            <?php
    ?>
            <br />
            <p><a href="archive.php?mid=<?php echo($data['Mon']);?>" style="color:#FFF;text-decoration:none;font-size:12px;font-weight:bolder;"><?php echo($mon_arr[$data['Mon']-1]); ?></a>
            <?php
    $sql
    ="SELECT * FROM articles WHERE MONTH(date)='"  $data['Mon']  . "' AND tags!='' ORDER BY sort_order ASC";
    $rs=mysql_query($sql);
    while(
    $rw=mysql_fetch_array($rs)) {
    ?>
            <br/><a href="read_more.php?nid=<?php echo($rw['article_id']);?>" style="text-decoration:none;"><strong style="color: rgb(105, 105, 105);"><?php echo stripslashes($rw['tags']); ?></strong></a>
            <?php ?>
            </p>
            <?php ?>
    </div></div>

  2.  


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:33 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com