Php Yorum Gösterme Sorunu :S

Sponsorlu Bağlantılar

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Kobra_FighterTR

Kobra_FighterTR

Üye
    Konu Sahibi
Php Yorum Gösterme Sorunu :S
php yi bilen arkadaşlardan yardım isteyeceğim.öncelikle : ) kendi sitemde yayınladığım scriptimde sadece makale yayınlıyorum ve bulduğum bu yorum scriptini ona entegre edip insanların altına yorum yazmasını istiyorum fakat,yorum scriptinde eklediğim her yorum bütün makale sayfalarında çıkıyor yani sayfaya göre olmuyor. makale.php?id=1 e yorum olarak güzel yazılmışsa 2 dede çıkıyor o yorum.yardımcı olabilrseniz çok minnettar kalırım.

SQL Kodları ;

PHP:
--
-- Veritabanı: `komedi`
--

-- --------------------------------------------------------

--
-- Tablo yapısı: `images`
--

CREATE TABLE IF NOT EXISTS `images` (
  `id` int(11) NOT  AUTO_INCREMENT,
  `imagesurl` text CHARACTER SET utf8 COLLATE utf8_turkish_ci NOT ,
  `Gonderen` text CHARACTER SET utf8 COLLATE utf8_turkish_ci NOT ,
  `Yorum` text CHARACTER SET utf8 COLLATE utf8_turkish_ci NOT ,
  PRIMARY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

--
showyorum.php
PHP:
<?php require_once('Connections/root.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 . "'" : "";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

mysql_select_db($database_root, $root);
$query_yorum = "SELECT * FROM images ORDER BY id DESC";
$yorum = mysql_query($query_yorum, $root) or die(mysql_error());
$row_yorum = mysql_fetch_assoc($yorum);
$totalRows_yorum = mysql_num_rows($yorum);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Resim Yorumlar</title>
<style type="text/css">
body,td,th {
    color: #EDEDED;
    font-weight: bold;
}
</style>
</head>

<body>
<table width="560" border="1" align="left">
  <tr >
    <td>Gonderen</td>
    <td>Yorum</td>
  </tr>
  <?php do { ?>
    <tr>
      <td><?php echo $row_yorum['Gonderen']; ?></td>
      <td><?php echo $row_yorum['Yorum']; ?></td>
    </tr>
    <?php } while ($row_yorum = mysql_fetch_assoc($yorum)); ?>
</table>
</body>
</html>
<?php
mysql_free_result($yorum);
?>

--------------- Ekleme ---------------

Sorunlu Kod

PHP:
$query_yorum = "SELECT * FROM images ORDER BY id DESC";

Sorunlu Kod Yukardaki Kod Fakat Ne Ekleyipde İstediğim Gibi Yapacam Halaa Bulamadım :'(
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Takipçi Satın Al


Üst Alt