I am in a competition where I need to make the top 10 salaries appear. I have my script complete.
<?php
$db = mysql_connect("localhost");
mysql_select_db("bpa", $db);
$sql = "select * from main order by 'salary' DESC";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
include ("underbody.inc");
include ("widthin.inc"); printf("<b>Job Name:</b> %s<hr></td>\n",$row["job_name"]);
include ("underjobname.inc");
include ("widthin.inc"); printf("<b>Salary:</b> %s,000<hr>\n",$row["salary"]);
include ("fotter.inc");
print("<p>");
}
?>
Thats my code. I can get it to descend. But I need it to limit it to 10. It displays like 50 some entries. Can anyone help me? I am a new one at this (2 weeks to be exact). Can anyone help this new guy? Thanks!
Chad R. Smith