Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9265429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:04:03+00:00 2026-06-18T14:04:03+00:00

Hello I’m trying to update this scholarship application box. However when the year changed

  • 0

Hello I’m trying to update this scholarship application box. However when the year changed to 2013 it only displays scholarship applicant info from 2013. I’d like it to display info from 2012. I tried messing around with the date but I cant seem to figure it out. Any help would be greatly appreciated!

    <?php
$appYear = date("Y").'-'.(date("Y")+1);
$sql = 'select * from sApplication where studentID = "'.$database->iPrep($_SESSION['ID']).'" AND appYear = "'.$appYear.'" LIMIT 1';
$appID = Scholarship::iFindSQL($sql);
$total = count($appID);
if ($total > 0)
    { 
        $app = array_shift($appID); 
    }
    else
        {
            $app = 0;
        }
?>
<li id="item-2">
  <div id="appStatus">
    <h3>Application Status</h3>
    <blockquote>
    <?php if ($app->submitted == ('0000-00-00') || !isset($app->submitted)) { ?> 

    <table style="border:1px solid #000;" width="100%" border="0" cellspacing="5" cellpadding="0">
  <tr>
    <td width="50%"><strong>Scholarship<br /> 2013-2014</strong></td>
    <td width="50" align="right"> <a style="font-size:16px;" href="welcome.php?   app=Scholar">Apply Now</a></td>
  </tr>
  <tr>
    <td><strong>Date Submitted</strong></td>
    <td align="right">&nbsp;</td>
  </tr>
  <tr>
    <td><strong>References</strong></td>
    <td align="right">&nbsp;</td>
  </tr>
  <tr>
    <td><strong>Decision</strong></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2"><hr /></td>
    </tr>
  <tr>
    <td><strong>Scholarship 2012-2013</strong></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><strong>Decision</strong></td>
    <td>&nbsp;</td>
  </tr>
    </table>



      <?php } else { ?> 
      <table style="border:1px solid #000;" width="100%" border="0" cellspacing="5" cellpadding="0">

        <tr>
          <td width="90%"><strong>Scholarship 2013-2014</strong></td>
          <td width="10%" align="right">&nbsp;</td>
        </tr>
        <tr>
          <td><strong>Date Submitted</strong></td>
          <td align="right"><?=dbOutDate($app->submitted)?></td>
        </tr>
        <tr>
          <td><strong>References</strong> </td>
          <td align="right"></td>
        </tr>

        <tr>
        <td colspan="2">
        <?php  
         $refs = Reference::iFindSQL("Select * from reference where appID = '".$app->ID."'");?>

        <table width="100%" border="0" cellspacing="0" cellpadding="0">

         <?php foreach($refs as $ref) { ?>
         <tr> <td> <small><?php if($ref->rType == 'Academic Reference'){ echo 'Academic/Artistic/Professional'; } else { echo 'Community Service'; } ?></small></td> <td align="right"><?=$ref->status?></td></tr>
      <?php } ?>

        </table>
        </td>
        </tr>
        <tr>
          <td><strong>Decision</strong></td>
          <td align="right">
         <?php
                if ($app->complete == 'Approved') { echo '<a   href="'.$_SERVER['PHP_SELF'].'?app=Bank&appID='.$app->ID.'">Approved</a>'; }
                if ($app->complete == 'Declined') { echo '<a href="'.$_SERVER['PHP_SELF'].'?app=Declined&appID='.$app->ID.'">Declined</a>'; }
                if ($app->complete == 'Pending') { echo 'Pending'; }
                if ($app->complete == 'Incomplete') { echo 'Incomplete'; }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T14:04:04+00:00Added an answer on June 18, 2026 at 2:04 pm

    Remove the WHERE clause that limits the year. Use ORDER BY to sort by year, descending.

    $sql = 'select * from sApplication 
        where studentID = "'.$database->iPrep($_SESSION['ID']).
        '" ORDER BY appYear DESC LIMIT 1';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello i'm trying create an application allowing me host any kind of file. In
Hello I am trying to implement a wake lock for an application. PowerManager pm
Hello everybody i have asp.net mvc4 application where i made countdown something like this:
Hello I'm trying to add MapView to LinearLayout this is my code: GoogleMap mMap
Hello I have like this 2 tables class User public int UserId{get;set;} { ....
Hello i'm doing a application in php, and i have a list of items
Hello I've got this query to get users by email, which is an unique
Hello my rendering is very glitchy on Tegra 3 devices.. any Idea how this
Hello everyone and thanks for your help! I currently have this program that renames
Hello all and a Happy New Year SITUATION: I have some tables in MySQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.