Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2007
    Location
    malaysia
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    help with query ?



    hey everyone,

    i hve a problem here... what i need to display is just one price... but as u can see... it displays 2 price at a time... can someone help me scan where is my mistake?

    PHP Code:
    <input type="hidden" name="payment" >
                                           <?
                                            $aPrice 
    db_query("SELECT p.product_desc,o.dt_order_product_price,o.dt_order_order_code from product_ms p inner join order_dt o
                                            on o.dt_order_product_code=p.product_code"
    );
                                            if (!
    is_array($aPrice) )
                                            {
                                                echo 
    "---";
                                            }
                                            else
                                            {
                                                foreach (
    $aPrice as $rowPrice)
                                                {
                                                        echo 
    "RM " .$rowPrice[1];
                                                }
                                            }
                                           
    ?>
                                   </td>

  • #2
    Regular Coder saeed's Avatar
    Join Date
    Oct 2002
    Location
    West Yorkshire
    Posts
    343
    Thanks
    32
    Thanked 0 Times in 0 Posts
    u need to be more specific and btw... thread is supposed to be in Database and not in PHP...
    Don't click on this!

    #!/usr/bin/saeed


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •