this code takes sooo slow to finish... this is a drop down slect box.. and i pull have to display it 5 times..
<?php
include("dbinfo.inc.php");
@mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$result = @mysql_query('SELECT id, make, model FROM fones2 ORDER BY make ASC, model ASC');
if (!$result) {
die('<p>Error performing query: ' . mysql_error() . '</p>');
}
$num=mysql_num_rows($result);
echo $num.'<br>';
<select name="id[]" size="1">
<option value="" selected>Select Model</option>
<?php
$i=0;
while ($i < $num)
{
$id=mysql_result($result,$i,"id");
$make=ucfirst(mysql_result($result,$i,"make"));
$model=mysql_result($result,$i,"model");
echo '<option value="'.$id.'" >'.$make.' '.$model.'</option>';
$i++;
}
?>
</select>
this code will have to run 5 times, and it pulls up close to 700 rows of data at each pass.. is there any other faster way for me to get this code done?
Thanks in advance..