Pocasnost pri PHP in Mysql
Igor
gigor_linux at yahoo.com
Wed Sep 11 09:33:27 CEST 2002
Lep pozdrav!
Imam problem z pocasnostjo v PHP in MySQl.
Medtem ko ASP dostopa preko ODBC na isto MySQL bazo in
naredi veliko hitreje (recimo 15sek proti 3 sek)
Se primer:
$db = mysql_pconnect("127.0.0.1", "root" , "pass");
mysql_select_db("enabaza",$db);
$sql = "select sum(nekaj) vsota from ena
tabela where eno_indexirano_polje='12'";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$vrni = $row["vsota"];
Se primer v ASP:
Set myConn = Server.CreateObject("ADODB.Connection")
Set myRs = Server.CreateObject("ADODB.Recordset")
myConn.Open CONN_STRING
strSQL = "SELECT ... (isti select)"
myConn.Execute strSQL
myRs.Open strSQL, myConn, adOpenStatic, , adCmdText
...
Se da kako hitreje napisat?
Zakaj je recimo ASP hitrejsi?
Vsak predlog dobrodosel.
Hvala
Igor
__________________________________________________
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute
More information about the lugos-list
mailing list