note 3429 deleted from ref.odbc by alindeman

From: Date: Mon, 18 Mar 2002 21:45:37 +0000
Subject: note 3429 deleted from ref.odbc by alindeman
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-27929@lists.php.net to get a copy of this message
When I make a query to my database with ODBC and the query takes a lot of time, I do not receive any data from my php3 page. Someone knows how to fix that?? This is my script: $sqlstring1="SELECT b.psstatus, a.producttype, count(*) cantidad FROM products a, prodsubs b, subscrib c WHERE c.cucustnr = b.pssubscribernr AND a.productnr = b.psproductnr AND (a.producttype = 'B' OR a.producttype = 'X') AND c.custatus <> 'D' AND c.cutype IN ('E','M','N','O','U') GROUP BY 1,2 ORDER BY b.psstatus, a.producttype "; $con1 = odbc_connect("IBS","fabsaa","icesi97"); $res1 = odbc_exec( $con1, $sqlstring1 ); unset( $valid_row ); $valid_row = odbc_fetch_into( $res1, &$resultarray); $i=0; $ContaPendP=0; $ContaPendE=0; while ( $valid_row ) { if ( $resultarray[0] == 'B' ) { if ( $resultarray[1] == 'B' ) { $ContaPendP = $resultarray[2];} else { $ContaPendE = $resultarray[2];} } else { $campo[$i]=$resultarray[2]; $i++;} $valid_row = odbc_fetch_into( $res1, &$resultarray ); } odbc_close($con1);

« previous php.notes (#27929) next »