Merhabalar;
Arkadaşlar aşağıda resimlerini vereceğim 2 tablo ve admin panelden bir görüntü var. Ne yaptıysam beceremedim. Yardımlarınız için teşekkür ederim.
Sorun;
Admin panelden alıntısını yaptıgım görüntüde Etkinlik Adı bölümünde Etkinlik Id'ye göre kayıtları eklemiyor. Diğer hiç bir yerde sorun yok. Mesela o tabloda Gökhan Özgüneş yazan yerin alttan iki satırında evren demir olarak kayıt var yani Id'si 2 olan yerdeki Etkinlik Adı kısmında Evren Demir basması gerekiyor veritabanında id'yi 2 atıyor ilgili kategorileri giriyor ama etkinlik adı bölümünde hep 1. Id'nin Etkinlik Adı neyse onu basıyor sadece.
Etkinlik Tablosu
Etkinlik Detay Tablosu
Admin Panel ilgili bölge
Php Kodlarım <?php require_once('../Connections/freebirdagency.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_freebirdagency, $freebirdagency);
$query_etkinlik = "SELECT * FROM ticket_etkinlik";
$etkinlik = mysql_query($query_etkinlik, $freebirdagency) or die(mysql_error());
$row_etkinlik = mysql_fetch_assoc($etkinlik);
$totalRows_etkinlik = mysql_num_rows($etkinlik);
mysql_select_db($database_freebirdagency, $freebirdagency);
$query_etkinlikdetay = "SELECT * FROM ticket_etkinlikdetay";
$etkinlikdetay = mysql_query($query_etkinlikdetay, $freebirdagency) or die(mysql_error());
$row_etkinlikdetay = mysql_fetch_assoc($etkinlikdetay);
$totalRows_etkinlikdetay = mysql_num_rows($etkinlikdetay);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Freebird Agency Kontrol Paneli</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="dist/css/bootstrap.css">
<link rel="stylesheet" href="dist/css/style.css">
<!-- Optional theme -->
<link rel="stylesheet" href="dist/css/bootstrap-theme.css">
<!-- Latest compiled and minified JavaScript -->
<script src="dist/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-default" role="navigation">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="./index.php"><img src="dist/img/freebirdagency_logo.png" alt="Freebird Agency" style="height: 50px; padding-top: 5px"></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Anasayfa</a></li>
<li><a href="#">Organizasyonlar</a></li>
<li><a href="#">Yapılan Satışlar</a></li>
<li><a href="#">Mesafeli Satış Sözleşmesi</a></li>
<li><a href="#">Gizlilik ve Güvenlik</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Profil Bilgileri</a></li>
<li><a href="cikis.php">Çıkış Yap</a></li>
</ul>
</div>
</div><!-- /.navbar-collapse -->
</nav>
<div class="content">
<div class="container">
<div class="row">
<div class="col-xs-6 col-md-4"></div>
<div class="col-xs-6 col-md-6"></div>
<div class="col-xs-6 col-md-2">
<button type="button" class="btn btn-primary btn-sm">Organizasyon Ekle</button>
</div>
</div>
<div class="table-responsive margin-top20">
<table class="table table-hover">
<thead>
<tr>
<th><input type="checkbox"></th>
<th>Id</th>
<th>Etkinlik Adı</th>
<th>Kat Id</th>
<th>Kategoriler</th>
<th>Tarih</th>
<th>Birim Fiyat</th>
<th><span class="glyphicon glyphicon-edit" alt="Düzenle"></span></th>
<th><span class="glyphicon glyphicon-trash" alt="Sil"></th>
</tr>
</thead>
<?php do { ?>
<tbody>
<tr>
<td><input type="checkbox"></td>
<td><?php echo $row_etkinlikdetay['EtkinlikId']; ?></td>
<td><?php echo $row_etkinlik['EtkinlikAdi']; ?></td>
<td><?php echo $row_etkinlikdetay['DetayId']; ?></td>
<td><?php echo $row_etkinlikdetay['DetayKat']; ?></td>
<td><?php echo $row_etkinlikdetay['DetayTarih']; ?></td>
<td><?php echo $row_etkinlikdetay['DetayFiyat']; ?></td>
<td><span class="glyphicon glyphicon-edit"></span></td>
<td><span class="glyphicon glyphicon-trash"></span></td>
</tr>
</tbody>
<?php } while ($row_etkinlikdetay = mysql_fetch_assoc($etkinlikdetay)); ?>
</table>
</div>
</div>
</div>
<footer id="footer">
<div class="container footer">
<a class="makeauthor" href="http://www.evrendemir.com" target="_blank">Salih Evren Demir</a>
</div>
</footer>
</body>
</html>
<?php
mysql_free_result($etkinlik);
mysql_free_result($etkinlikdetay);
?>