$SqlStatement=$db->prepare("SELECT TransDate, TransPmtAmt FROM Cust_ac +t_da WHERE CustomerNumber = ? AND TransType = 'P'") or die "prepare f +ailed: " . $db->errstr()."\n"; $SqlStatement->execute($CustomerNumber); while ( @stuff = $SqlStatement->fetchrow() ) { # do things with @stuff $FormatTransDate = substr($TransDate, 0, 10); $FormatTransPmtAmt = sprintf("\$%.2f", $TransPmtAmt); print $FormatTransDate; print " "; print $FormatTransPmtAmt; } $SqlStatement->finish;
In reply to Re: Re: Re: Re: Loop Question
by Anonymous Monk
in thread Loop Question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |