$db_s_id = param("scid"); my $sth = $dbh->prepare (qq{ SELECT * FROM `prods` WHERE ? IN (sub_cat1,sub_cat2,sub_cat3) AND `u` = "1"}); $sth->execute($db_s_id); my $_cell_cnt = 0; while($row = $sth->fetchrow_hashref()) { $_cell_cnt++; $_srp_price = $row->{srp}; $_table_data .= qq~ ~; if(-e "/home/<>/www/images/prod_images/$row->{pid}.gif") { $_table_data .= qq~$row->{name}~; } else { $_table_data .= qq~No Image Yet Available. Sorry.~; } $_table_data .= qq~ $row->{name}
~; if($row->{instock} && ($row->{instock} == 1)) { $_stock_message = "In Stock"; $_table_data .= qq~[Add to Cart] ~; } else { $_stock_message = qq~Out of Stock~; } if($_logged_in && ($_logged_in == 1)) { $_table_data .= qq~[Add to Wish List]~; } $_table_data .= qq~
$row->{desc}
Item Number: $row->{pid}~; if($row->{itemSize} && ($row->{itemSize} ne "")) { $_table_data .= qq~ .:. Size: $row->{itemSize}~; } $_table_data .= qq~ $_stock_message~; if($row->{uom} && ($row->{uom} ne "")) { $_table_data .= qq~ .:. Unit of Measure: $row->{uom}~; } $_table_data .= qq~ ~ . escapeHTML(sprintf("%.2f", "$_srp_price")) . qq~ ~; } $sth->finish();