Go Back   SitePoint Forums > Forum Index > Program Your Site > PHP
Newsletter FAQ Members List Calendar Mark Forums Read

New to SitePoint Forums? Register here for free!

SitePoint Sponsor
 
Reply
 
Thread Tools Display Modes
Old Aug 29, 2006, 11:07   #1
mrpostiga
SitePoint Enthusiast
 
Join Date: May 2006
Location: Portugal
Posts: 54
Question myodbc: oh my god this is terrible

the code i post here is too slow to run. WHY?
PHP Code:

//////////////////////////////////////////////////////////////////

// Ficheiros Necessários
require_once('../../../adodb/adodb.inc.php');
require_once(
'../../../classes/class.GenericEasyPagination.php');
require_once(
'../../../modulos/lang/entidades.lang.php');
require_once(
'../../../skins/erros.lang.php');
require_once(
'../../../modulos/inc/funcoes.php');
require_once(
'../../../db/db.conf');
// Definição de variáveis GLOBAIS
$css = "../../../modulos/css/style.css";
$img_print = "../../../modulos/img/_imprimir.gif";
$img_pdf = "../../../modulos/img/pdf.gif";
$underscore = "_";

///////////////////////////////////////////////////////////////////
//Data/Hora
$ano = date("Y");
$mes = date("m");
$dia = date("d");
$hora = date("H");
$minuto = date("i");
$segundo = date("s");
// Para filtragem Inicial do dia anterior ao Currente
$dia_menos_um = $dia-1;
$data_filtro = "$ano$mes$dia_menos_um";
$i = 0;

///////////////////////////////////////////////////////////////////
//Tempo de Carregamento de página
$m_time = explode(" ",microtime());
$m_time = $m_time[0] + $m_time[1];
$starttime = $m_time;

///////////////////////////////////////////////////////////////////
// Definir Constantes
if ($_GET["page"]!=""):        $page    = $_GET["page"];    else:    $page    = 1;        endif;
define ('RECORDS_BY_PAGE',$num_registos);
define ('CURRENT_PAGE',$page);

///////////////////////////////////////////////////////////////////
// Utilizador Registado?
if(isset($_COOKIE['username']))
{

///////////////////////////////////////////////////////////////////
// Header da página - Condições de Filtragem
echo"<HTML lang=\"pt\" dir=\"ltr\">
<HEAD>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<title>$lang[100]</title>
<link href=\"$css\" rel=\"stylesheet\" type=\"text/css\">
</HEAD>
<BODY>

<script>

<!-- Begin
var popUpWin=0;
function popUpWindow(URLStr,w,h)
{

  var width = w;
  var height = h;
  var left = (screen.width-width)/2;
  var top = (screen.height-height)/2;

  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}
//  End -->

</script>

<SCRIPT LANGUAGE=\"JavaScript\">

<!-- Begin
function printWindow() {
bV = parseInt(navigator.appVersion);
if (bV >= 4) window.print();
}
//  End -->

</script>"
;

///////////////////////////////////////////////////////////////////
//Escolha de EMPRESA por SQL
$emp = $_COOKIE['empresa'];
// Ligação Base de Dados - Variável
$db_host_acs = "$sigla_inicial$emp$underscore$ano$rot$sigla_final";
// emp000_2006_emp480RM_MDB
// echo $db_host_acs;
$cnx = odbc_connect("$db_host_acs","$db_usr_acs","$db_psw_acs")or die ("Base de dados não acessível: $db_host_acs");
$SQL_Exec_String = "SELECT pmrutl_empnome, pmrutl_empr FROM ".$pmr_empresas." ";
$SQL_Exec_String .= "WHERE pmrutl_empr='".$emp."'";
$cur = odbc_exec( $cnx, $SQL_Exec_String ) or die ("$SQL_Exec_String, Tabela não acessível na base de dados: $db_host_acs");
$emp_nome = odbc_result($cur, "pmrutl_empnome");
$emp_cod = odbc_result($cur, "pmrutl_empr");
odbc_close($cnx);
$msg = "::&nbsp;$emp_cod - $emp_nome";
//$msg = "000 - PRODUTOS PARA MECANIZAÇÃO E RACIONALIZAÇÂO INFORMATICA, LDA.";
//$msg = $emp;

///////////////////////////////////////////////////////////////////
//Defenição de variáveis para ORDENAÇÂO
$ord_n_entidade = "empent_codi";
$ord_ncontribuinte = "empent_cont9";
$ord_nome = "empent_nome";
$ord_morada = "empent_mora";
$ord_localidade = "empent_loca";
$ord_cod_postal = "empent_post";
$ord_cod_postal_desig = "pmrtabcp_desi";
$ord_telefone = "empent_telf";
    
echo
"<center>
<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"5\"><tbody>
<tr><td class=\"title\">$msg</td></tr></tbody></table>
<br>
<TABLE width=\"100%\">
  <FORM action=\"$PHP_SELF\" method=\"post\">
    <TR>
      <TD class=\"filtragem\"><div align=\"right\">
          <table width=\"100%\"  border=\"0\">
            <tr>
              <td width=\"62%\" height=\"26\" scope=\"col\" class=\"filtragem\">
                            <div align=\"left\">
                  <SELECT name=\"opcao\">
                    <option value=\"n_entidade\">$lang[0]</option>
                    <option value=\"ncontribuinte\">$lang[2]</option>
                                        <option value=\"nome\">$lang[1]</option>
                                        <option value=\"morada\">$lang[4]</option>
                    <option value=\"localidade\">$lang[9]</option>
                                        <option value=\"cod_postal\">$lang[5]</option>                    
                                        <option value=\"cod_postal_desig\">$lang[6]</option>
                    <option value=\"telefone\">$lang[7]</option>
                  </SELECT>
                  <INPUT name=\"filtragem_texto\" type=\"text\" size=\"40\">&nbsp;$lang[78]&nbsp;
                  <SELECT name=\"opcao_ord\">
                    <option value=\"$ord_n_entidade\">$lang[0]</option>
                    <option value=\"$ord_ncontribuinte\">$lang[2]</option>
                                        <option value=\"$ord_nome\">$lang[1]</option>
                                        <option value=\"$ord_morada\">$lang[4]</option>                                    
                    <option value=\"$ord_localidade\">$lang[9]</option>
                    <option value=\"$ord_cod_postal\">$lang[5]</option>    
                                        <option value=\"$ord_cod_postal_desig\">$lang[6]</option>                    
                    <option value=\"$ord_telefone\">$lang[7]</option>
                  </SELECT>
                  <INPUT name=\"submit1\" type=\"submit\" value=\"$lang[74]\">
              </div></td>
              <td width=\"38%\" scope=\"col\"><div align=\"right\"><B>$lang[101]</B></div></td>
            </tr>
          </table>
      </div></TD>"
;
    
/*</TR>
    <TR>
      <TD class=\"corpo\"><div align=\"right\">$lang[115]&nbsp;
                    <SELECT name=\"op_ano\">";
            for ($i=2004; $i<=2010; $i++)
              {
                  printf('<option value="'.$i.'">'.$i.'</option>');
              }
          echo"</SELECT>
                    $lang[110]&nbsp;
                    <select name=\"op_data_mes_inf\">";
              for ($i=1; $i<=12; $i++)
              {
                            //if (!
                            printf('<option value="'.converteNum($i).'">'.converteNum($i).'</option>');  
              }
          echo"</SELECT>
          <select name=\"op_data_dia_inf\">";
              for ($i=1; $i<=31; $i++)
              {
                  printf('<option value="'.converteNum($i).'">'.converteNum($i).'</option>');
              }
          echo"</SELECT>
          $lang[112]&nbsp;  
          <select name=\"op_data_mes_sup\">";
              for ($i=1; $i<=12; $i++)
              {
                  printf('<option value="'.converteNum($i).'"'); if(converteNum($i) == $mes) printf(' selected'); printf('>'.converteNum($i).'</option>');
              }
          echo"</SELECT>
          <select name=\"op_data_dia_sup\">";
              for ($i=1; $i<=31; $i++)
              {
                  printf('<option value="'.converteNum($i).'"'); if(converteNum($i) == $dia) printf(' selected'); printf('>'.converteNum($i).'</option>');
              }
          echo"</SELECT>
          &nbsp;$lang[113]&nbsp;   
                    <select name=\"op_armz_inf\">";
              for ($i=1; $i<=99; $i++)
              {
                  printf('<option value="'.converteNum($i).'">'.converteNum($i).'</option>');
              }
          echo"</SELECT>
          $lang[112]&nbsp;
          <select name=\"op_armz_sup\">";
              for ($i=1; $i<=99; $i++)
              {
                  printf('<option value="'.converteNum($i).'"'); if(converteNum($i) == 99) printf(' selected'); printf('>'.converteNum($i).'</option>');
              }
          echo"</SELECT>
          &nbsp;$lang[114]&nbsp;  
          <select name=\"op_tipo_inf\">";
              for ($i=01; $i<=99; $i++)
              {
                  printf('<option value="'.converteNum($i).'">'.converteNum($i).'</option>');
              }
          echo"</SELECT>
          $lang[112]&nbsp;
          <select name=\"op_tipo_sup\">";
              for ($i=1; $i<=99; $i++)
              {  
                  printf('<option value="'.converteNum($i).'"'); if(converteNum($i) == 99) printf(' selected'); printf('>'.converteNum($i).'</option>');
              }
          echo"</SELECT>
          $lang[116]&nbsp;
          <INPUT name=\"ndoc_inf\" type=\"num\" size=\"11\" value=\"1\">
          $lang[112]&nbsp;
          <INPUT name=\"ndoc_sup\" type=\"num\" size=\"11\" value=\"999999999\">
          &nbsp;<INPUT name=\"submit2\" type=\"submit\" value=\"$lang[77]\">&nbsp;
      </div></TD>
    </TR>*/
  
echo"</FORM>
</TABLE>
<TABLE WIDTH=\"100%\">
<FORM name=\"selform\" method=\"post\" action=\"OBRAS.php\">
<TR><TD colspan=\"8\"><HR></TD></TR><TR>
<TD WIDTH=\"4%\" class=\"header\">&nbsp;$lang[10]</TD>
<TD WIDTH=\"4%\" class=\"header\">$lang[2]</TD>
<TD WIDTH=\"31%\" class=\"header\">&nbsp;$lang[1]</TD>
<TD WIDTH=\"22\" class=\"header\">&nbsp;$lang[4]</TD>
<TD WIDTH=\"9%\" class=\"header\">&nbsp;$lang[9]</TD>
<TD WIDTH=\"10%\" class=\"header\">&nbsp;$lang[5]</TD>
<TD WIDTH=\"10%\" class=\"header\">&nbsp;$lang[6]</TD>
<TD WIDTH=\"10%\" class=\"header\">&nbsp;$lang[7]</TD></TR>
<TR><TD colspan=\"8\"><HR></TD></TR>"
;

///////////////////////////////////////////////////////////////////
//Variaveis de POST
$texto = $_POST['filtragem_texto'];
$op = $_POST['opcao'];
$op_ord = $_POST['opcao_ord'];

///////////////////////////////////////////////////////////////////
// Escolhe registo por "PageExecute Method"
//$strSQL = " SELECT id_user,user_name FROM users ORDER BY user_name";
// SQL INICIAL
$strSQL = "SELECT empent_codi, empent_cont9, empent_nome, empent_nom1, empent_mora, ";
$strSQL .= "empent_loca, empent_pais, pmrtabps_desi, empent_post, pmrtabcp_desi, empent_telf, empent_fax, ";
$strSQL .= "empent_email, empent_cnct, empent_ling, pmrtabln_desi, empent_moed ";
$strSQL .= "FROM ".$c_ent_cabecalho." ORDER BY empent_codi DESC";

///////////////////////////////////////////////////////////////////
// Opções
switch ($op)
{  
    case
"n_entidade":
    
$strSQL = "SELECT empent_codi, empent_cont9, empent_nome, empent_nom1, empent_mora, ";
    
$strSQL .= "empent_loca, empent_pais, pmrtabps_desi, empent_post, pmrtabcp_desi, empent_telf, empent_fax, ";
        
$strSQL .= "empent_email, empent_cnct, empent_ling, pmrtabln_desi, empent_moed FROM ".$c_ent_cabecalho." ";
        
$strSQL .= "WHERE empent_codi LIKE '%".$texto."%' ";
        
$strSQL .= "ORDER BY ".$op_ord." DESC";
  break;
    case
"ncontribuinte":
    
$strSQL = "SELECT empent_codi, empent_cont9, empent_nome, empent_nom1, empent_mora, ";
    
$strSQL .= "empent_loca, empent_pais, pmrtabps_desi, empent_post, pmrtabcp_desi, empent_telf, empent_fax, ";
        
$strSQL .= "empent_email, empent_cnct, empent_ling, pmrtabln_desi, empent_moed FROM ".$c_ent_cabecalho." ";
        
$strSQL .= "WHERE empent_cont9 LIKE '%".$texto."%' ";
        
$strSQL .= "ORDER BY ".$op_ord." DESC";
  break;
  case
"nome":
    
$strSQL = "SELECT empent_codi, empent_cont9, empent_nome, empent_nom1, empent_mora, ";
    
$strSQL .= "empent_loca, empent_pais, pmrtabps_desi, empent_post, pmrtabcp_desi, empent_telf, empent_fax, ";
        
$strSQL .= "empent_email, empent_cnct, empent_ling, pmrtabln_desi, empent_moed FROM ".$c_ent_cabecalho." ";
        
$strSQL .= "WHERE empent_nome LIKE '%".$texto."%' ";
        
$strSQL .= "ORDER BY ".$op_ord." DESC";
  break;
  case
"morada":
    
$strSQL = "SELECT empent_codi, empent_cont9, empent_nome, empent_nom1, empent_mora, ";
    
$strSQL .= "empent_loca, empent_pais, pmrtabps_desi, empent_post, pmrtabcp_desi, empent_telf, empent_fax, ";
        
$strSQL .= "empent_email, empent_cnct, empent_ling, pmrtabln_desi, empent_moed FROM ".$c_ent_cabecalho." ";
        
$strSQL .= "WHERE empent_mora LIKE '%".$texto."%' ";
        
$strSQL .= "ORDER BY ".$op_ord." DESC";
  break;
  case
"localidade":
    
$strSQL = "SELECT empent_codi, empent_cont9, empent_nome, empent_nom1, empent_mora, ";
    
$strSQL .= "empent_loca, empent_pais, pmrtabps_desi, empent_post, pmrtabcp_desi, empent_telf, empent_fax, ";
        
$strSQL .= "empent_email, empent_cnct, empent_ling, pmrtabln_desi, empent_moed FROM ".$c_ent_cabecalho." ";
        
$strSQL .= "WHERE empent_loca LIKE '%".$texto."%' ";
        
$strSQL .= "ORDER BY ".$op_ord." DESC";
  break;
  case
"cod_postal":
    
$strSQL = "SELECT empent_codi, empent_cont9, empent_nome, empent_nom1, empent_mora, ";
    
$strSQL .= "empent_loca, empent_pais, pmrtabps_desi, empent_post, pmrtabcp_desi, empent_telf, empent_fax, ";
        
$strSQL .= "empent_email, empent_cnct, empent_ling, pmrtabln_desi, empent_moed FROM ".$c_ent_cabecalho." ";
        
$strSQL .= "WHERE empent_post LIKE '%".$texto."%' ";
        
$strSQL .= "ORDER BY ".$op_ord." DESC";
  break;
  case
"cod_postal_desig":
    
$strSQL = "SELECT empent_codi, empent_cont9, empent_nome, empent_nom1, empent_mora, ";
    
$strSQL .= "empent_loca, empent_pais, pmrtabps_desi, empent_post, pmrtabcp_desi, empent_telf, empent_fax, ";
        
$strSQL .= "empent_email, empent_cnct, empent_ling, pmrtabln_desi, empent_moed, pmrtabmd_desi  FROM ".$c_ent_cabecalho." ";
        
$strSQL .= "WHERE pmrtabcp_desi LIKE '%".$texto."%' ";
        
$strSQL .= "ORDER BY ".$op_ord." DESC";
  break;
  case
"telefone":
    
$strSQL = "SELECT empent_codi, empent_cont9, empent_nome, empent_nom1, empent_mora, ";
    
$strSQL .= "empent_loca, empent_pais, pmrtabps_desi, empent_post, pmrtabcp_desi, empent_telf, empent_fax, ";
        
$strSQL .= "empent_email, empent_cnct, empent_ling, pmrtabln_desi, empent_moed FROM ".$c_ent_cabecalho." ";
        
$strSQL .= "WHERE empent_telf LIKE '%".$texto."%' ";
        
$strSQL .= "ORDER BY ".$op_ord." DESC";
  break;
}

///////////////////////////////////////////////////////////////////
// CONECÇÃO Á BASE DE DADOS
$objConnection = &ADONewConnection('odbc');
$objConnection->Connect("$db_host_acs","$db_usr_acs","$db_psw_acs")or die ("Base de dados não acessível: $db_host_acs");

///////////////////////////////////////////////////////////////////
// Executa o SQL QuerY
$objConnection->SetFetchMode(ADODB_FETCH_ASSOC);
$rs = $objConnection->PageExecute($strSQL,RECORDS_BY_PAGE,CURRENT_PAGE) or die ("$c_ent_cabecalho, Tabela não acessível na base de dados: $db_host_acs");

///////////////////////////////////////////////////////////////////
// Mostra registos
if (!$rs->EOF)
{
    
$recordsFound = $rs->_maxRecordCount;
    while(!
$rs->EOF)
    {
        
///////////////////////////////////////////////////////////////////
        // Chamar Registos - e guarda-os em variáveis
        
$empent_codi = $rs->fields["empent_codi"];
        
$empent_cont9 = $rs->fields["empent_cont9"];
        
$empent_nome = $rs->fields["empent_nome"];
        
$empent_nom1 = $rs->fields["empent_nom1"];
        
$empent_mora = $rs->fields["empent_mora"];
        
$empent_loca = $rs->fields["empent_loca"];
        
$empent_pais = $rs->fields["empent_pais"];
        
$pmrtabps_desi = $rs->fields["pmrtabps_desi"];
        
$empent_post = $rs->fields["empent_post"];
        
$pmrtabcp_desi = $rs->fields["pmrtabcp_desi"];
        
$empent_telf = $rs->fields["empent_telf"];
        
$empent_fax = $rs->fields["empent_fax"];
        
$empent_email = $rs->fields["empent_email"];
        
$empent_cnct = $rs->fields["empent_cnct"];
        
$empent_ling = $rs->fields["empent_ling"];
        
$pmrtabln_desi = $rs->fields["pmrtabln_desi"];
        
$empent_moed = $rs->fields["empent_moed"];
        
        
///////////////////////////////////////////////////////////////////
        // Variáveis enviadas por $_GET para A pagina de detalhes
        
$detalhes = "empent_codi=$empent_codi&empent_cont9=$empent_cont9&empent_nome=$empent_nome";
        
$detalhes .= "&empent_nom1=$empent_nom1&empent_mora=$empent_mora&empent_loca=$empent_loca";
        
$detalhes .= "&empent_pais=$empent_pais&empent_post=$empent_post&pmrtabcp_desi=$pmrtabcp_desi";
        
$detalhes .= "&empent_telf=$empent_telf&empent_fax=$empent_fax&empent_email=$empent_email";
        
$detalhes .= "&empent_cnct=$empent_cnct&empent_ling=$empent_ling&pmrtabln_desi=$pmrtabln_desi";
        
$detalhes .= "&empent_moed=$empent_moed&pmrtabps_desi=$pmrtabps_desi";
        
$detalhes .= "&db_host_acs=$db_host_acs";
        
        
///////////////////////////////////////////////////////////////////
        // Faz o display dos registos por array's
        
echo"<TR class=\"rowdata\">";
    echo
"<TD WIDTH=\"4%\" class=\"corpo\"><a href=\"javascript:popUpWindow('../../../modulos/popup/GERAL/detalhes_entidade.php?$detalhes',800,220);\">&nbsp;<U><B>$empent_codi</B></U></A></TD>";
    echo
"<TD WIDTH=\"4%\" class=\"corpo\">&nbsp;$empent_cont9</TD>";
    echo
"<TD WIDTH=\"31%\" class=\"corpo\">&nbsp;$empent_nome&nbsp;$empent_nom1</TD>";
    echo
"<TD WIDTH=\"22%\" class=\"corpo\">&nbsp;$empent_mora</TD>";
    echo
"<TD WIDTH=\"9%\" class=\"corpo\">&nbsp;$empent_loca</TD>";
    echo
"<TD WIDTH=\"10%\" class=\"corpo\">&nbsp;$empent_post</TD>";
    echo
"<TD WIDTH=\"10%\" class=\"corpo\">&nbsp;$pmrtabcp_desi</B>";
    echo
"</TD><TD WIDTH=\"10%\" class=\"corpo\">&nbsp;$empent_telf</TD></TR>";
        
        
///////////////////////////////////////////////////////////////////
        // $rs serve de motor para prossimos registos
        
$rs->moveNext();
    }
    
  
///////////////////////////////////////////////////////////////////
  //Tempo de Processamento
  
$round = 3;//Número de casas decimais a mostrar
  
$m_time = explode(" ",microtime());
  
$m_time = $m_time[0] + $m_time[1];
  
$endtime = $m_time;
  
$totaltime = ($endtime - $starttime);
      
  
///////////////////////////////////////////////////////////////////
  // Footer da Pagina
  
echo"<TR class=\"rowdata\"></TR>
  <TR><TD colspan=\"8\"><HR></TD></TR><TR>
  <TD class=\"header\">&nbsp;</TD>
  <TD class=\"header\">&nbsp;</TD>
  <TD class=\"header\"><div align=\"left\"><B>&nbsp;</B></div></TD>
  <TD class=\"header\">&nbsp;</TD>
  <TD class=\"header\">&nbsp;</TD>
  <TD class=\"header\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>"
.round($totaltime,$round)."</B></TD>
  <TD class=\"header\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"javascript:printWindow()\">$lang[76]&nbsp;<IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" src=\"$img_print\" ALT=\IMPRIMIR\" TITLE=\"IMPRIMIR\"></a></TD>
  <TD class=\"header\"><div align=\"right\">&nbsp;&nbsp;<a href=\"../../../modulos/pdf/entidades.listagem.php?rs=$rs\" target=\"_blank\"><img src=\"$img_pdf\" width=\"16\" height=\"16\" border=\"0\"></a></div></TD></TR>
  <TR><TD colspan=\"8\"><HR></TD></TR>
  </FORM>
  </TABLE>"
;

    
///////////////////////////////////////////////////////////////////
    // Paginação
    
$GenericEasyPagination =& new GenericEasyPagination(CURRENT_PAGE,RECORDS_BY_PAGE,"default");
    
$GenericEasyPagination->setTotalRecords($recordsFound);
    
//echo "<br>";
    
echo "<strong>Registos encontrados: </strong>".$recordsFound;
    echo
"<br>Registo ";
    echo
$GenericEasyPagination->getListCurrentRecords();
    echo
"<br>";
    echo
$GenericEasyPagination->getNavigation();
    echo
"<br>";
    echo
$GenericEasyPagination->getCurrentPages();
    echo
"<br>";

}

///////////////////////////////////////////////////////////////////
// Rodapé da Página
echo"<HR><SMALL><A class=\"title\" href=\"http://www.pmrleiria.pt\" target=\"_blank\">PMR(LEIRIA) - INFORMÁTICA</A> - <A href=\"http://www.pmrleiria.pt\" target=\"_blank\">PMR SOFTWARE</A></SMALL></center></BODY>
</HTML>"
;

///////////////////////////////////////////////////////////////////
// Se utilizar não registado - msg
}
else
{echo
"O Utilizador não se encontra Registado.";}
?>
mrpostiga is offline   Reply With Quote
Old Aug 29, 2006, 11:09   #2
mrpostiga
SitePoint Enthusiast
 
Join Date: May 2006
Location: Portugal
Posts: 54
sorry for the long code
mrpostiga is offline   Reply With Quote
Old Aug 29, 2006, 11:33   #3
clamcrusher
SitePoint Wizard
silver trophy
 
Join Date: Mar 2006
Posts: 6,132
you can time sections of your code by using the microtime() function.
this will allow you to find the worst sections.
clamcrusher is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread | Next Thread »

Thread Tools
Display Modes

 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Sponsored Links
 
Forum Jump


All times are GMT -7. The time now is 15:39.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright 1998-2009, SitePoint Pty Ltd. All Rights Reserved