newbie here... i need help in speeding up the loading of a dropdown box that has an alphabetically ordered list of customers(the table has 450 customersr). on a local server, it runs in fractions of a second. i was asked to move the database online and this drop down box takes seconds to load. there's a noticeable delay of one to two seconds with a 384kbps-1.5Mbps+ downstream dsl.
i tried using mysql_fetch_array/mysql_fetch_object but both take the same time to load.
/ code 1 /
$result = mysql_query("SELECT * FROM Customers ORDER BY Customer_Name");
if ($result)
{
echo "<SELECT NAME='CustName'>";
while ($row = mysql_fetch_object($result))
{
echo "<OPTION VALUE=\"".$row->Customer_ID."\">".$row->Customer_Name." </OPTION> ";
}
echo "</SELECT>";
}
/ code 2 /
$result = mysql_query("SELECT * FROM Customers ORDER BY Customer_Name");
if ($result)
{
echo "<SELECT NAME='CustName'>";
while ($row = mysql_fetch_array($result))
{
echo "<OPTION VALUE=\"".$row["Customer_ID"]."\">".
$row["Customer_Name"]." </OPTION> ";
}
echo "</SELECT>";
}
when accessed from a 128kbps isdn connection, it takes 2 to 3 seconds... sometimes 4 seconds. please help out a newbie. thanks. 🙂