utkdave
09-02-2011, 08:06 PM
Alright I am displaying information from an excel spreadsheet from a database through MySQL, someone else set it up for me with the code. They put it to where it only displays 11 names of the 500+ on the spreadsheet, I need to know how I can display all of the names not just 11 of them... heres the code:
<?php
$designation = ($_GET['designation']);
$year = ($_GET['year']);
echo $designation;
echo " ";
echo $year;
if ($designation == 1) {// had to make sure to use == instead of = here
$query = "SELECT * FROM members WHERE designation = $designation AND iYear = $year ORDER BY fullName ASC LIMIT 0, 600";
} else if ($designation == 0 ) {// had to make sure to use == instead of = here
$query = "SELECT * FROM members WHERE designation = $designation AND hYear = $year ORDER BY fullName ASC LIMIT 0, 600";
}
$result = @mysql_query($query);
if ($result) {
echo '<table align=\"left\" cellspacing=\"0\" cellpadding=\"5\" border=\"1\">';
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
echo "<tr><td align=\"left\" valign=\"top\"><a href=\"member_detail.php?ID=$row[0]\">► $row[1] $row[3]</a>";
echo "</td></tr>\n";
} echo '</table>';
}
?>
<?php
$designation = ($_GET['designation']);
$year = ($_GET['year']);
echo $designation;
echo " ";
echo $year;
if ($designation == 1) {// had to make sure to use == instead of = here
$query = "SELECT * FROM members WHERE designation = $designation AND iYear = $year ORDER BY fullName ASC LIMIT 0, 600";
} else if ($designation == 0 ) {// had to make sure to use == instead of = here
$query = "SELECT * FROM members WHERE designation = $designation AND hYear = $year ORDER BY fullName ASC LIMIT 0, 600";
}
$result = @mysql_query($query);
if ($result) {
echo '<table align=\"left\" cellspacing=\"0\" cellpadding=\"5\" border=\"1\">';
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
echo "<tr><td align=\"left\" valign=\"top\"><a href=\"member_detail.php?ID=$row[0]\">► $row[1] $row[3]</a>";
echo "</td></tr>\n";
} echo '</table>';
}
?>