Pengaturan

Gambar

Lainnya

Tentang KASKUS

Pusat Bantuan

Hubungi Kami

KASKUS Plus

© 2024 KASKUS, PT Darta Media Indonesia. All rights reserved

asepsetiawan050Avatar border
TS
asepsetiawan050
Neeed Heeeelpp gaaan !!
[B]Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in /opt/lampp/htdocs/Aplikasi/03-view.php on line 68[/B]

itu ane nerusin kerjaan orang gaan jadi ga ada databasenya ane bikin lagi dah tuh ane perhatiin sedikit demi sedikit script dan akhirnya jadilah seperti itu emoticon-Mewek
itu kenapa ya gan ?

nih ane kasih liat scriptnya..

<?php
session_start();
if(!isset($_SESSION['user_id'])) {
header("Location: index.php");

}
?>
<?php
$flagQ=0;
$total=0;
$sumtotal=0;
$conn =mysql_connect("localhost","root","");
$db = mysql_select_db("dbcmsportal",$conn);

$co_id=$_SESSION['co_id'];
if($co_id == 0) {
$flagQ +=1;
$sql = "SELECT code,tittle,sum(price*number_dl) price,sum(number_dl) number_dl FROM `tblcmsportal` Group BY code,tittle ORDER BY `tblcmsportal`.`code` ASC ";
$hasil = mysql_query($sql,$conn);
//echo 'sql1'.$sql;
}else if($co_id>0){
$flagQ +=1;
$sql = "SELECT code,tittle,sum(price*number_dl) price,sum(number_dl) number_dl FROM `tblcmsportal` where co_id='$co_id' Group BY code,tittle ORDER BY `tblcmsportal`.`code` ASC ";
$hasil = mysql_query($sql,$conn);
//echo 'sql2';
}

?>
<div id="container">
<div id="header">
<h1>MENU UTAMA</h1>
</div>

<div id="menu">
<a href="00-home.php">Home</a>
<a href="01-upload.php">Upload</a>
<a href="03-view.php" class="active">View</a>
<a href="#">Report</a>
</div>
<link rel="stylesheet" type="text/css" href="css/style2.css">
<link rel="stylesheet" type="text/css" href="css/tcal.css" />
[removed][removed]
<form method="post" action="03-search.php">

<div>Code Product : <input type="text" name="code"> Date From: <input type="text" name="date1" class="tcal" value="" /> To : <input type="text" name="date2" class="tcal" value="" />

<input type="SUBMIT" name="SUBMIT" id="SUBMIT" value="search" ><br><br>
</div>
</form>
<link rel="stylesheet" type="text/css" href="css/button.css" />
<a class="cms" href="03-download.php"> Download CMS</a>
<h1 align="center" >Data CMS</h1>
<br>
<span><span style="font-style: italic;"><span style="font-style: italic;"><div style="height: 590px; width: 1200px; font: 20px/35px Georgia,Garamond,Serif; overflow: scroll;">
<center><table width="1180" border="3" cellspacing="0" cellpadding="0"><center>
<tr height="50" bgcolor="grey">

<th width="300"><font>Code Product</td>
<th width="300">Tittle Product</td>
<th width="150">Image</td>
<th width="50">Price</td>
<th width="150">Number Download</td>
</tr>

<?php

if($flagQ>0) {
while ($data = mysql_fetch_row($hasil)){

?>
<?php
$rupiah=number_format($data[2],0,'','.');
//$format1 = date('d F Y', strtotime($data[7]));
$sumtotal+=$data[2];
$total+= $data[3];
?>


<tr>

<td><p style="text-align:center;"><?php echo '<a href="#" style="text-decoration:none">' . $data[0]; echo'</a>';?></td>
<td><p style="text-align:center;"><?php echo '<a href="#" style="text-decoration:none">' . $data[1]; echo'</a>';?></td>
<td width="200" height="150"></td>
<td><p style="text-align:right;"><?php echo $rupiah;?></p></td>
<td><p style="text-align:center;"><?php echo $data[3];?></p></td>
</tr>
<?php } } ?>
<tr>
<td colspan="3"></td>
<td height="50"><p style="text-align:right;"><b>Total :
<?php
$totalprice=number_format($sumtotal,0,'','.');
echo $totalprice;

?>
</p></b>
</td>
<td><p style="text-align:center;"><b>Total :
<?php
$jumlah=number_format($total,0,'','.');
echo $jumlah;
?></p></b>
</td>
</tr>
</table>
</div>
</span></span></span>
</div>

minta pencerahannya ya gann.. emoticon-Mewek
Diubah oleh asepsetiawan050 14-10-2014 14:29
0
1.2K
1
GuestAvatar border
Guest
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Mari bergabung, dapatkan informasi dan teman baru!
Website, Webmaster, Webdeveloper
Website, Webmaster, WebdeveloperKASKUS Official
23.3KThread4.4KAnggota
Terlama
GuestAvatar border
Guest
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Ikuti KASKUS di
© 2023 KASKUS, PT Darta Media Indonesia. All rights reserved.