Page 1 of 1

slow of retrive data when using ODBC

Posted: Sun May 25, 2003 8:53 pm
by valen53
i got a system that need to connect 2 DB , one is mysql , another is ODBC.
when i retrive data from ODBC, it will turn to very slow. And i feel trouble each time retrive data from ODBC, b'cos need to connect again, then close
any method can making faster ? thank's for any reply

$dw = odbc_connect("dw","dd","dd")

$query = "SELECT * FROM DW.dw_emp WHERE DEPT_ID >= '$dept_From' and DEPT_ID <= '$dept_To' ";

$result = odbc_exec($dw, $query);
while($row = odbc_fetch_array($result))

odbc_close($dw);