data not found

_FB_NAME_ · Jun 28, 2013
mas mau tnya saya ada masalah di source code dibawah ini..
mungkin mas bisa menganalisa dimana letak kesalahan nya,,

terima kasih
[code=php]
mysql_num_rows():supplied
argument is no a valid MYSQL result resource in C:\appserv\www\aplikasi\carid.php on line 140 data not found 
[/code]

Lihat semua 1 jawaban

Silahkan login untuk menjawab!
Mas ellix mohon pencerahan bagaimana yah masukin data dari fungsi


//request("msg","<?php echo DIR_MODS_SN;?>/stokiest/simpan_keranjang.php?prdId="+id+"&prodharga="+hg+"&jmlproduct="+jml+"&prodname="+nm,false);

// Saya mau memasukannya Kedalam session tapi gagal 
	

    function returnSponsor(id,nm,hg,stok,bv,r){
     
    var wo=window.opener;
            var jml=window.prompt("Masukkan jumlah barang :");
            if(jml!=null && parseInt(jml)>0){
    wo.eval("document.formDaftar.idbarang"+r).value=id;
    wo.eval("document.formDaftar.barang_name"+r).value=nm;
    wo.eval("document.formDaftar.barang_harga"+r).value=hg;
    wo.eval("document.formDaftar.barang_jumlah"+r).value=jml;
    request("msg","<?php echo DIR_MODS_SN;?>/stokiest/simpan_keranjang.php?prdId="+id+"&prodharga="+hg+"&jmlproduct="+jml+"&prodname="+nm,false);
          //  window.close();
            }
            else
            {
                alert('Masukkan jumlah barang dengan benar.');
            }
        }

Lihat semua 3 jawaban

Silahkan login untuk menjawab!
mas mau tanya,, ini saya ada kesulitan tp saya tidak tau kesalahannya dimana
mhon mas bisa menganalisa simana kesalannya...

trimaskasih


<div id="desain_main">
<div align="right">
<?php
if (!empty($_GET) && $_GET)
?>
</div>
<form action="" method="post" enctype="multipart/form-data">
<table width="100%" border="1" cellspacing="0" bordercolor="#666666">
<tr>
<td colspan="10" bgcolor="#66CCFF"><table width="100%" border="0" cellpadding="3" cellspacing="2" background="gambar/anslkdasd copy.png" bgcolor="#66CCFF">
<tr>
<td width="7%"><label class="style20">Bulan</label></td>
<td width="89%"><select name="bl" id="bl">

<option value="01">January</option>
<option value="02">February</option>
<option value="03">March</option>
<option value="04">April</option>
<option value="05">May</option>
<option value="06">June</option>
<option value="07">July</option>
<option value="08">August</option>
<option value="09">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>
<select name="th" id="th">

<? $q=2006; $qq=date("Y");
while ($q!=$qq) { echo"<option value=";echo $q;echo" >";echo $q;echo"</option>"; $q=$q+1; } echo"<option value=";echo $q;echo" >";echo $q;echo"</option>"; ?>
</select> <input type="submit" name="button" id="button" value="Lihat"></td>
<td width="16%"><label><input type="submit" name="button" id="button" value="PRINT"></label></td>
<td width="67%"><label></label></td>
</tr>
</table></td>
</tr>
<tr>
<td width="3%" rowspan="2" bgcolor="#00FFFF" class="style20"><div align="center" class="style21">No</div></td>
<td width="7%" rowspan="2" bgcolor="#00FFFF" class="style20"><div align="center" class="style21">
<div align="center" class="style20">No Nota </div>
</div>
<div align="center" class="style21"></div></td>
<td width="11%" rowspan="2" bgcolor="#00FFFF" class="style20"><div align="center" class="style21">Nama</div></td>
<td width="10%" rowspan="2" bgcolor="#00FFFF" class="style20"><div align="center" class="style21"><span class="style4">Alamat</span></div>
<div align="center" class="style21"></div></td>
<td width="9%" rowspan="2" bgcolor="#00FFFF" class="style20"><div align="center"><span class="style4">Jasa</div></td>
<td width="10%" rowspan="2" bgcolor="#00FFFF" class="style20"><div align="center"><span class="style4">Keterangan</span></div></td>
<td width="11%" rowspan="2" bgcolor="#00FFFF" class="style20"><div align="center" class="style21">Status</div>
<div align="center" class="style21"></div></td>
<td colspan="3" bgcolor="#00FFFF" class="style20"><div align="center">Tanggal Masuk </div></td>
</tr>
<tr>
<td width="4%" bgcolor="#00FFFF" class="style20"><div align="center">Tgl</div></td>
<td width="5%" bgcolor="#00FFFF" class="style20"><div align="center">Bulan</div></td>
<td width="5%" bgcolor="#00FFFF" class="style20"><div align="center">Tahun</div></td>
</tr>
<?php
include("sambung.php");//koneksi kedatabase
mysql_select_db("laundry");//membuka database
$warnaGenap = "#C7FEFD"; // warna abu-abu
$warnaGanjil = "#FFFFFF"; // warna putih
if($Submit){
$cari=(" SELECT *
FROM `identitas`
WHERE `$select` ='$pencarian'
LIMIT 0 , 30 ");
$no=1;
$counter = 1;
$ambil=mysql_query($cari);
while($data=mysql_fetch_row($ambil)){
if ($counter % 2 == 0) $warna = $warnaGenap;
else $warna = $warnaGanjil;
?>
<tr bgcolor="$warna">
<td bgcolor="#FFFFFF"><div align="center"><?php echo"$no"?></div></td>
<td bgcolor="#FFFFFF"><div align="center"><?php echo"$data[0]"?></div></td>
<td bgcolor="#FFFFFF"><div align="center"><?php echo"$data[1]"?></div></td>
<td bgcolor="#FFFFFF"><div align="center"><?php echo"$data[2]"?></div></td>
<td bgcolor="#FFFFFF"><div align="center"><?php echo"$data[3]"?></div></td>
<td bgcolor="#FFFFFF"><div align="center"><?php echo"$data[4]"?></div></td>
<td bgcolor="#FFFFFF"><div align="center"><?php echo"$data[5]"?></div></td>
<td bgcolor="#FFFFFF"><div align="center"><?php echo"$data[6]"?></div></td>
<td bgcolor="#FFFFFF"><div align="center"><?php echo"$data[7]"?></div></td>
<td bgcolor="#FFFFFF"><div align="center"><?php echo"$data[8]"?></div></td>
</tr>
<tr>
<td></tr></td>
</tr>
<?php
$no++;

$counter++;
}
}
?>
</table>
</form>
<p>&nbsp;</p>
</div>

</div>
</div>

<div id="desain_footer_wrapper">
<div id="desain_footer">

<a href="index.php">Home</a> | <a href="Input.php">Input Data</a> | <a href="lihat.php">Lihat Data</a> | <a href="caridata.php">Cari Data</a> <br /><br />

Copyright © 2013 Faizal Muhardianto IF'10

</div>
</div>

Lihat semua 2 jawaban

Silahkan login untuk menjawab!
maaf mau tanya saya buat Form input data dengan window.opener dan sudah berfungsi dengan baik,, Tapi saya Punya masalah ketika yang diinputkan Lebih dari satu maka fungsi yg saya Buat ini tidak berfungsi
mohon Pencerahan
http://pastebin.com/3dTGd7C3
	

    // halaman index.php
     <form  method="post" name="formDaftar" id="formDaftar">
    <input type="text" name="idbarang" id="idbarang" value="" size="10" readonly=""/>
    <input type="button" value="Browse" onclick="javascript:window.open('data_tabel.php?d=barang', 'Sbarang','scrollbars=yes');return false;">
    <input type="text" name="barang_name" value="" readonly="">
    <input type="text" name="barang_harga" value="" readonly="">
    <input type="text" name="barang_bv" value="" readonly="">
    <br />
     
    <!-------Kalau dari fungsi ini Kebawah dihapus Bisa jalan gan -->
    <input type="text" name="idbarang" id="idbarang" value="" size="10" readonly=""/>
    <input type="button" value="Browse" onclick="javascript:window.open('data_tabel.php?d=barang', 'Sbarang','scrollbars=yes');return false;">
    <input type="text" name="barang_name" value="" readonly="">
    <input type="text" name="barang_harga" value="" readonly="">
    <input type="text" name="barang_bv" value="" readonly="">
     
     
    /////////////////////halaman data-tabel.php//////////////////////////
     
     
    <?php
    include_once 'connection.php';
    ?>
    <form name="frmCari" method="post">
    Barang ID : <input type="text" name="m_cari"><input type="submit" value="Cari" name="cari">
    </form>
     
    <?php
            if($_POST['cari']){
            $q=mysql_query("select * FROM kr_product where p_id='".$_POST['m_cari']."'");
            if($q){
    ?>
    <script type="text/javascript" language="javascript">
        //<![CDATA[
        function returnSponsor(id,nm,hg,bv){
     
    var windowprops='width=100,height=100,scrollbars=yes,status=yes,resizable=yes'
    var heightspeed = 2; // vertical scrolling speed (higher = slower)
    var widthspeed = 7;  // horizontal scrolling speed (higher = slower)
    var leftdist = 10;    // distance to left edge of window
    var topdist = 10;     // distance to top edge of window
     
            window.opener.eval("document.formDaftar.idbarang").value=id;
            window.opener.eval("document.formDaftar.barang_name").value=nm;
                    window.opener.eval("document.formDaftar.barang_harga").value=hg;
                     window.opener.eval("document.formDaftar.barang_bv").value=bv;
            window.close();
        }
        //]]>
    </script>
    <table border="1" cellpadding="5" cellspacing="0">
    <thead>
            <tr>
                    <th>ID Barang</th>
                    <th>Nama Barang</th>
                    <th>Harga</th>
                    <th>BV</th>
                   
            </tr>
    </thead>
    <tbody>
    <?php
            while($r=mysql_fetch_array($q)){
    echo "<tr>
    <td><a href=\"#\" style=\"display:block;background-color:#ccc;\" onclick=\"javascript:returnSponsor('".$r['p_id']."','".$r['p_name']."','".$r['p_harga']."','".$r['p_bv']."');return false;\">".$r['p_id']."</a></td>
                            <td>".$r['p_cat_id']."</td>
                            <td>".$r['p_name']."</td>
                           
                           
                            </tr>
                    ";
            }
            }
            }
    ?>
    </tbody>
    ///////////////////////////////////////////////////////Connnecttttion/////////////////////
    <?php
    $sqlhost="localhost";
    $sqluser="root";
    $sqlpasswd="";
    $sqldb="datasaya";
    $conn=mysql_connect("$sqlhost","$sqluser","$sqlpasswd") or die("<p align=center>CAN NOT CONNECT TO MYSQL SERVER</p>");
    mysql_select_db($sqldb) or die("<p align=center>Warning database not exists!</p>");
    ?>
     
    ////////////////////////////////////////////////////////////////SQLLL///////////////////////////////
     
    CREATE TABLE IF NOT EXISTS `kr_product` (
      `p_id` varchar(5) NOT NULL,
      `p_cat_id` varchar(4) NOT NULL,
      `p_name` varchar(100) NOT NULL,
      `p_desc` text NOT NULL,
      `p_harga` int(11) NOT NULL,
      `p_bv` int(11) NOT NULL DEFAULT '0',
      `p_screenshoot` varchar(100) NOT NULL,
      `p_view` int(11) NOT NULL,
      `p_publish` enum('0','1') NOT NULL DEFAULT '1',
      `p_uploaddate` datetime NOT NULL,
      `p_uploadby` varchar(100) NOT NULL,
      `p_stok` int(10) NOT NULL,
      PRIMARY KEY (`p_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
     
    --
    -- Dumping data untuk tabel `kr_product`
    --
     
    INSERT INTO `kr_product` (`p_id`, `p_cat_id`, `p_name`, `p_desc`, `p_harga`, `p_bv`, `p_screenshoot`, `p_view`, `p_publish`, `p_uploaddate`, `p_uploadby`, `p_stok`) VALUES
    ('200', 'K003', 'KIT', '<p>KIT Member AMC</p>', 550000, 0, '', 158, '1', '0000-00-00 00:00:00', '', 30);

Lihat semua 1 jawaban

Silahkan login untuk menjawab!

Shopcart Dengan Jquery

danura · Jun 25, 2013
Mas ellix Mau tanya Bagaimana cara Buat shopcart dengan ajax

Lihat semua 2 jawaban

Silahkan login untuk menjawab!

pengurangan

Robert James M · Jun 23, 2013
halo mas udah lama ga nanya, mau nanya nih

langsung aja...

aku punya tabel A

nama jumlah
A1 10
A2 20

tabel B

nama hari diminta
A1 1 5
A1 2 4

nah kan kalo pengurangan si gampang

tinggal jumlah dikurang diminta (10 - (5+4)) = 1

tapi kalo mau detail bagimana???

jadi maunya kaya gini

nama hari jumlah diminta sisa
A1 1 10 5 5
A1 2 5 4 1

jadi sisa perhitungan itu masuk ke jumlah buat perhitungan selanjutnya,, masalahnya banyaknya nama ga tentu....

semoga paham ya mas suwun....
:P

Lihat semua 1 jawaban

Silahkan login untuk menjawab!