1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PHP & Mysql calculation problem

Discussion in 'PHP' started by ian_ok, Apr 17, 2005.

  1. #1
    I'm trying to do a calculation from a database field within a php script, but the output always comes out as the raw data

    This is my code:
     Price in Pts: <?php
                    define("pst",166.386);
                    $total=0.00;
                    $total=renderSingleListingItemRaw($listingID, "price_es")*pst ;
                    $total = number_format($total, 2);
                    echo $total;
                    ?> 
    PHP:
    I've also tried changing the * to *constant
    removed the define with $pst=166.386

    And I still just get the raw output of price_es

    Anyone help with this?

    Ian
     
    ian_ok, Apr 17, 2005 IP
  2. palespyder

    palespyder Psycho Ninja

    Messages:
    1,254
    Likes Received:
    98
    Best Answers:
    0
    Trophy Points:
    168
    #2
    palespyder, Apr 18, 2005 IP