Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^3: dynamic website, putting data into right tablefield's

by ultibuzz (Monk)
on Apr 17, 2007 at 18:16 UTC ( #610607=note: print w/replies, xml ) Need Help??

in reply to Re^2: dynamic website, putting data into right tablefield's
in thread dynamic website, putting data into right tablefield's

well the script know of all active products at the now state and all historical active products, that may be inactive or still active.
anyway i need to treat both of them, if someone wants to edit old data it shoud add the now active products to the historical ones.
with prebuilding the array with total_pid i get sure all,historical and now, products are in there ;), gives me a better feeling ^^.
when i only run ym_cty_product i may miss a product.
when i update/ insert into the database without the first run (empty values i miss some data in db, can be my update/insert sub but with first run everything looks fine in db
please correct me if i don't get somthing wrong because im quit new into these HoH and so on ^^

kd ultibuzz

PS: the data can not be entered in the wrong cell because each cell contains a sup and product, so every value is unique accesible.
i'will post my table creation tomorrow from office, i think this makes it clearer then my PS ^^

Update: here is my table code looks a bit messy but it works ^^

foreach my $row (@total_sup) { my $sup = Get_Supplier_Name($row); print qq(<td align="center" bgcolor="#7E7E7E" colspan="2"><b>$ +sup</b></td>); } print qq(</tr><tr><td align="center" bgcolor="#7E7E7E"><b>Product Name +</b></td>); print qq(<td align="center" bgcolor="#7E7E7E"><b>Flag</b></td>); foreach my $row (@total_sup) { print qq(<td align="center" bgcolor="#7E7E7E"><b>Front End</b> +</td>); print qq(<td align="center" bgcolor="#7E7E7E"><b>Solid Sales</ +b></td>); } print qq(</tr>); foreach my $row (@total_pid) { my $sups = scalar(@total_sup); my $prod_name = Get_Product_Name($row,$group); print qq(<tr><td align="center" bgcolor="#FFFFFF"><input type= +"hidden" name="prod_id" value="$row">$prod_name</td>); print qq(<td align="center" bgcolor="#FFFFFF"><input type="hid +den" name="flag" value="$rowhash{$row}{'FLAG'}">$rowhash{$row}{'FLAG' +}</td>); for (my $i=1;$i<=$sups;$i++) { print qq(<td align="center" bgcolor="#FFFFFF"><input t +ype="text" name="sup_f_$now_sup[$i-1]" value="$rowhash{$row}{$now_sup +[$i-1]}{'DATA_F'}" size="10"></td>); print qq(<td align="center" bgcolor="#FFFFFF"><input t +ype="text" name="sup_s_$now_sup[$i-1]" value="$rowhash{$row}{$now_sup +[$i-1]}{'DATA_S'}" size="10"></td>); } print qq(</tr>); } my $col_span = (scalar(@now_sup)*2)+2; print qq(<tr><td align="center" bgcolor="#7E7E7E" colspan="$col_span"> +<input type="submit" value=" SAVE "></td></tr>);

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://610607]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (12)
As of 2017-02-23 19:02 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (350 votes). Check out past polls.