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

  • SEARCH
  • Home
  • 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 6222699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:21:33+00:00 2026-05-24T08:21:33+00:00

Ok, I have a gallery that’s being populated by a database but for some

  • 0

Ok, I have a gallery that’s being populated by a database but for some reason it’s not pulling entries from beyond May 31st 2011. I’ve scoured the code and can’t find any date limitations so I’m at a loss as to why it’s not pulling in any recent entries.

I’ve also looked through the database table and don’t see any irregularities between pre May31st and more current entries.

<?php
//GALLERY PAGE
$user="USER";
$password = "PASSWORD";
$database = "GALLERY";
$hostname_portfolio ="localhost:3306";

//gets the page number from the URL

if($_GET["pageNum"]==''){
$listedNum=0;

//gets the page limit from the URL
$limit=5;
}

else{
$listedNum=$_GET["pageNum"];

//gets the page limit from the URL
$limit=$_GET["limit"];

}
//creates the list of projects and puts them into an array
$project= array();

$con = mysql_connect($hostname_portfolio,$user,$password);
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

$dbcon = mysql_select_db("GALLERY", $con);
if (!$dbcon)
  {
  die('Could not connect: ' . mysql_error());
  }
  if ($dbcon)
  {
  }

 mysql_select_db($database, $con);

$result = mysql_query("SELECT * FROM Persons ORDER BY date_uploaded DESC");


  echo"<div class='clear' style='clear:both;'></div>";

$j=0;
do{
  if($row['approved']=="true"){
    $project[$j] = 
        "<div class='project-list'>
            <div class='user-project'>
                <div class='container'>
                    <div class='before-box' >
                        <p class='picture_state'>Before</p>
                        <a href='http://THEURL.com/". $row['image_path']."'>
                        <img src= '". $row['image_path']. "' width='400px' height='300px'/></a>
                        <br />
                    </div>
                    <div class='after-box'>
                        <p class='picture_state'>After</p>
                        <a href='". $row['picture_state']."'>
                        <img src= '". $row['picture_state']. "' width='400px' height='300px' /></a>
                        <br />
                    </div>
                    <div class='sidebox'>
                        <div class='inner-sidebox'>
                            <p class='date-project'>
                                Submitted by " . $row['FirstName'] . " " . $row['LastName']. " on " .$row['date_uploaded']. "</p>
                            <p> " .$row['decription']. "</p>";
            if($row['ATTR1'] || $row['ATTR2']){ 
                $project[$j] .= "<p>Used "; 
                if ($row['ATTR1']){ 
                    $project[$j] .= "PRODUCT2&trade;"; 
                    if ($row['color1']){ 
                        $project[$j] .= " in " . $row['color1']; 
                    }
                    if ($row['ATTR2']){
                        $project[$j] .= " and ";  
                    }   
                }
                if($row['ATTR2']){ 
                    $project[$j] .= "PRODUCT<sup>&reg;</sup>"; 
                    if ($row['color2']){ 
                        $project[$j] .= " in " . $row['color2']; 
                    }
                }
                $project[$j] .= "</p>"; 
            }
            $project[$j] .= "
                        </div>
                    </div>
                </div>
                <div class='clear' style='clear:both;'>
                </div>
            </div>
            <div class='clear' style='clear:both;'>
            </div>
        </div>
        <div class='clear' style='clear:both;'>
        </div>";
        $j++; 
}

}

while($row = mysql_fetch_array($result));

$max=sizeof($project);

for($i=$listedNum;$i<$limit;$i++){

echo $project[$i];

}


$max=sizeof($project) - 1;

echo "<div class='bottom' style='width:170px;margin:0px auto;'>";

if($listedNum > 0){
    $prevPageNum=$listedNum - 5;
    $lastPage= $limit - 5;
    echo "<a href='http://THEURL.com/gallery.php?    pageNum=".$prevPageNum."&limit=".$lastPage."'>< Last Page </a>";   
}
else{
$prevPageNum=$listedNum;
$lastPage= $limit;
}
echo"&nbsp;&nbsp;";
if($limit <= $max){

$newPageNum=$listedNum + 5;
$nextPage= $limit + 5;
echo "<a href='http://THEURL.com/gallery.php?pageNum=".$newPageNum."&limit=".$nextPage."'> Next Page ></a>";    

}

else{
    $newPageNum=$listedNum;
    $nextPage= $limit;
}

echo "</div>";

mysql_close($con);
?> 
  • 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-05-24T08:21:34+00:00Added an answer on May 24, 2026 at 8:21 am

    There’s nothing in the code. It might be the way your database is configured where it only lets a certain number of results be returned and that happens to coincide with the date.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have gallery.php that loads images with src path from a database. I also
I have this gallery that uses that ipad / iphone swipe from http://www.simplesli.de but
I have a PHP photo gallery that reads the GPS coordinates from images. I'd
I have a gallery that shows the images of some playing cards. Each card
I have a Gallery widget that allows a user to select from a variety
I have a regular Gallery widget. For some reason, the getView method in my
I have a gallery that I use to display some ImageViews. I'd like to
I have a Gallery object that scrolls from left to right and back again.
I have an Android Gallery widget that displays several ImageViews with pictures from the
Good day, I have a photo gallery that pulls from a json feed. The

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.