Hello to all,
I am kind of newbie and need a bit help around this piece of code:
- Putting piece of code into table
- adding new filed
This is the code:
[php] <?php // no direct access
*/
defined( 'JEXEC’ ) or die( ‘Restricted access’ );
JHTML::(‘behavior.mootools’); ?>
"; } $query1 ="select * from jos_vm_shopper_group ORDER BY shopper_group_id asc"; $result1 = mysql_query($query1) or die(mysql_error()); while ($row1 =mysql_fetch_array($result1)) { $shopper_group_id=$row1["shopper_group_id"]; $bb=strpos($group,$row1['shopper_group_name']); $url=$row1['shopper_group_maloprodaja_url']; $phone=$row1['shopper_group_phone']; if(is_numeric($bb)) { $row_a=mysql_query("select * from jos_vm_product_price where shopper_group_id='$shopper_group_id' and product_id=$product_id"); $result_a=mysql_fetch_array($row_a); if ($result_a["product_price"] !=0) { //echo "select * from jos_vm_product_price where shopper_group_id='$shopper_group_id' and product_id=$product_id"; echo "".$row1['shopper_group_name']." ► Tel: ".$row1['shopper_group_phone']." ► Cena: ".number_format($result_a["product_price"],0,'.',',')." RSD
"; } } } } /* if(!empty($product_id)) */ //} else echo ""; //echo $date; ?>[/php]
There is this piece of code:
[php]if ($result_a[“product_price”] !=0) {
//echo “select * from jos_vm_product_price where shopper_group_id=’$shopper_group_id’ and product_id=$product_id”;
echo “<a href=’”.$row1[‘shopper_group_maloprodaja_url’]."’ >".$row1[‘shopper_group_name’]." ► Tel: “.$row1[‘shopper_group_phone’].” ► Cena: “.number_format($result_a[“product_price”],0,’.’,’,’).” RSD
";
[/php]
That i would like to put in nice looking table with headers: Name, Phone, Price.
Other part is possibility of adding one more field “URl to product” into existing code.
If any additional info needed please ask.