Sorry, for my recklessness....
I missed, "$bdku=mysql_select_db("guru",$konek);"
Es ist peinlich.... It's embarassing.
But thanks for your help.
=========
On Wed, 1 Aug 2007 15:15:43 +0700
Patrik Hasibuan <[EMAIL PROTECTED]> wrote:
> Hi Sichta,
>
> That's what I am confused. Quoted or no Quote makes no effect. mysql_query
> does not work.
>
> I tried to debug with "..or die (mysql_error());" but it seems
> "mysql_error()" does not exist anymore.
>
> Please keep telling me. I've wasted to much time today hanging around with
> this weird problem.
> ====
> On Wed, 1 Aug 2007 08:27:51 +0200
> "Sichta, Daniel" <[EMAIL PROTECTED]> wrote:
>
> > Hi ,
> >
> > Try this:
> > $hsl=mysql_query($stringsql,$koneksi);
> >
> > DS
> >
> > -----Original Message-----
> > From: Patrik Hasibuan [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, August 01, 2007 8:23 AM
> > To: [email protected]
> > Subject: [PHP] I am confused to mysql_query.
> >
> > 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
> >
> >
> >
>
>
> --
> Patrik Hasibuan <[EMAIL PROTECTED]>
> Junior Programmer
--
Patrik Hasibuan <[EMAIL PROTECTED]>
Junior Programmer
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php