Dear my friends...

This sql string produces proper output in my MySQL-Query:
select image_src from products where product_id='10';
the output is:
gambarproduk/0/10/1.jpg

But my php code does not produce anything.

Please tell me what is my mistake.
===
<?php
if (isset($pid)){
        $koneksi=mysql_connect("127.0.0.1","root","mysuccess");
        $stringsql="select style, 
                                                description,
                                                price 
                                        from styles 
                                        where product_id='$pid';";
        $hsl=mysql_query("$stringsql","$koneksi");
        while ($brs=mysql_fetch_row($hsl)){
                list($edisi,$deskripsi,$harga)=$brs;
        }       
        
        $konek=mysql_connect("127.0.0.1","root","mysuccess");
        if ($konek){ 
                echo "konek berhasil <br>";
                $sqlgbr="select image_src 
                                        from products 
                                        where product_id='$pid';";
                echo "$sqlgbr <br>";
                $hslgbr=mysql_query("$sqlgbr","$konek");
                if (!$hslgbr){ 
                        echo "query gambarproduk tidak berhasil <br>"; 
                }elseif ($hslgbr){
                        echo "array gambar";
                }
                while ($brsgbr=mysql_fetch_row($hslgbr)){
                        list($gambarproduk)=$brsgbr;
                        echo "urlgambar: $gambarproduk <br>";
                }
        }
}       
?>
===
-- 
Patrik Hasibuan <[EMAIL PROTECTED]>
Junior Programmer

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to