|  | Posted by aCe on 09/22/07 06:57 
hi all,i need to convert these simple PHP code into stored procedure :
 <?php
 $result	=	mssql_query( "SELECT whid, whcode FROM warehouse" );
 while( $wh = mssql_fetch_object( $result ) )
 {
 $result	=	mssql_query( "SELECT plid, nopl FROM packlist WHERE whid =
 '" . $wh->whid . "'";
 while( $pl = mssql_fetch_object( $result ) )
 {
 $result	=	mssql_query( "SELECT qty FROM packlistnmat WHERE plid =
 '" . $pl->plid . "'";
 while( $pln = mssql_fetch_object( $result ) )
 {
 echo "Stock from " . $wh->whcode . " AND Packing List number " .
 $pl->plid . " = " . $pln->qty;
 }
 }
 }
 ?>
 my focus is in nested query, then i can call each field from the query
 (SELECT whid, whcode...) in sub query.
 thanks,
 aCe
  Navigation: [Reply to this message] |