PHP Classes

The barcode repeate the first one

Recommend this page to a friend!

      Barcode  >  All threads  >  The barcode repeate the first one  >  (Un) Subscribe thread alerts  
Subject:The barcode repeate the first one
Summary:MySql with many registers but the barcode repeates
Messages:1
Author:Marcos Yoshida
Date:2012-06-04 22:04:02
 

  1. The barcode repeate the first one   Reply   Report abuse  
Picture of Marcos Yoshida Marcos Yoshida - 2012-06-04 22:04:02
I'm trying to generate a list with many barcodes using MySql. The data is change but the barcode image repeats, why? Is there an work arround solution?

Follow the script:
$sql=mysql_query("SELECT Tab_Stock_Mov.PartNumber, SerialNumber, NF_inv, BinLocation
FROM Tab_Stock_Mov LEFT JOIN Tab_CadPro ON Tab_Stock_Mov.PartNumber = Tab_CadPro.PartNumber WHERE Tab_Stock_Mov.NF_Inv = '$inv'" ) or die(mysql_error());

echo "<table border=1 width=50% cellspacing=7 style='position:absolute; left: 0px; top: 0px'>";
while($result_sql_cat = mysql_fetch_object($sql)){
$sn=$result_sql_cat->SerialNumber;
$pn=$result_sql_cat->PartNumber;

$barnumber=$pn;
$bcode=$bar->genBarCode($barnumber,"jpg","bcimage");

echo "<TR HEIGHT=1><TD WIDTH=20%><FONT FACE='Ariel' SIZE=3> PN: $barnumber </FONT></TD>";
echo "<TD WIDTH=20% ALIGN=CENTER VALIGN=BOTTOM><img src='bcimage.jpg'>";
echo "</TD></TR>";

$barnumber=$sn;
$bcode=$bar->genBarCode($barnumber,"jpg","bcimage2");

echo "<TR><TD WIDTH=20%><FONT FACE='Ariel' SIZE=3> SN: $barnumber </FONT></TD>";
echo "<TD WIDTH=20% ALIGN=CENTER VALIGN=BOTTOM><img src='bcimage2.jpg'>";
echo "</TD></TR>";

$bar->error(true);
}
echo "</table>";



Thanks