Thanks a million, works great now.

----- Original Message ----- 
From: "Mark Newnham" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 25, 2001 1:41 PM
Subject: RE: [PHP-DB] Help with loop


> $res = mysql_query("SELECT * FROM ecomm where ID ='$sid'",$db))
>       if(!$res){echo("error preforming query: " . mysql_error());exit();}
> //----error trap
> while(  $row=mysql_fetch_array($res)){
>   $pno=$row["part"];
> 
> 
> #####################################################
> Mark Newnham
> Application Design Associates, Inc
> 6021 S.Syracuse Way #302
> Englewood, CO 80111, USA
> 
> http://www.adacorp.com
> #####################################################
> 
> 
> 
> > -----Original Message-----
> > From: Robert [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 25, 2001 12:31 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-DB] Help with loop
> > 
> > 
> > Why does this spit out the same part over and over until it times out?
> > 
> > I have 2 tables in the same database
> > 
> > 1:  bruindba     <-------Parts database
> >           specific_p   <----Part Number
> >           manufactur  <---Manufacturer
> >           package       <---Package in
> >          
> > 2: ecomm   <-------Ecommerce database
> >          ID     <-------session ID random number generated 
> > when first part is entered
> >          part   <-------Part number
> > 
> > What I am trying to do is store the part numbers with the 
> > session ID in ecomm and then pull all of them
> > out with descriptions from bruindba. 
> > 
> > //----------------------------- Get parts for this session 
> > ------------------------
> > //-------------------- Check ecomm DB for parts by session ID 
> > -------------------
> > while ($res = mysql_query("SELECT * FROM ecomm where ID 
> > ='$sid'",$db)){
> >       if(!$res){echo("error preforming query: " . 
> > mysql_error());exit();}   //----error trap
> >   $row=mysql_fetch_array($res);
> >   $pno=$row["part"];
> > 
> >   //---------------------Get part info from bruindba  
> > -----------------------
> >   $result = mysql_query("SELECT * FROM bruindba where 
> > specific_p ='$pno'",$db);
> >       if(!$result){echo("error preforming query: " . 
> > mysql_error());exit();}  //----error trap
> >   $row=mysql_fetch_array($result);
> >   $spp=$row["specific_p"];
> >   $mfc=$row["manufactur"];
> >   $pkg=$row["package"];
> >   echo" $spp";
> >   echo" $pkg";
> >   echo" $mfc";
> > }
> > 
> > 
> > Thanks for any help you can provide                       -Bob-    
> >      
> > 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to