mysql de bir sorunum var.

muhtarmuhtar agaphan

merhaba

aşağıdaki hata mesajını alıyorum yardımcı olabilecek varmı?

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

2014-04-11 17:46:43

Php

MYSQL kodunu yanlış yazmışsın. yazdığın kodu gösterirsen bakabiliriz.

Her programcı birgün Php yi tadacaktır
2014-04-11 20:26:18

kodlar

muhtarmuhtar agaphan

kodların bir kısmını aşağıya aktarıyorum, 

<?php session_start();?>

<?php if (($_SESSION['USER_kullanicino']=="")||($_SESSION['USER_rol']!="Yönetici"))

{

?>

<script>

//parent.location='../../login.php';

</script>

<?php }?>

<?php require_once('../../../gebze1/Connections/cnnGOKSEN_MESAJCI.php'); ?>

<?php

$editFormAction = $_SERVER['PHP_SELF'];

if (isset($_SERVER['QUERY_STRING'])) {

  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);

}

if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {

  $updateSQL = sprintf("UPDATE tblkullanicilar SET adsoyad=%s, grup=%s WHERE KULLANICINO=%s",

                       GetSQLValueString($_POST['adsoyad'], "text"),

                       GetSQLValueString($_POST['adsoyad'], "text"),

                       GetSQLValueString($_POST['KULLANICINO'], "int"));

  mysql_select_db($database_cnnGOKSEN_MESAJCI, $cnnGOKSEN_MESAJCI);

  $Result1 = mysql_query($updateSQL, $cnnGOKSEN_MESAJCI) or die(mysql_error());

  $updateGoTo = "../../../gebze1/administrator/grupmanagement/list_grup.php";

  if (isset($_SERVER['QUERY_STRING'])) {

    $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";

    $updateGoTo .= $_SERVER['QUERY_STRING'];

  }

  header(sprintf("Location: %s", $updateGoTo));

}

$colname_rsetGrup = "-1";

if (isset($_GET['KULLANICINO'])) {

  $colname_rsetGrup = (get_magic_quotes_gpc()) ? $_GET['KULLANICINO'] : addslashes($_GET['KULLANICINO']);

}

mysql_select_db($database_cnnGOKSEN_MESAJCI, $cnnGOKSEN_MESAJCI);

$query_rsetGrup = sprintf("SELECT * FROM tblkullanicilar WHERE KULLANICINO = %s", $colname_rsetGrup);

$rsetGrup = mysql_query($query_rsetGrup, $cnnGOKSEN_MESAJCI) or die(mysql_error());

$row_rsetGrup = mysql_fetch_assoc($rsetGrup);

$totalRows_rsetGrup = mysql_num_rows($rsetGrup);

function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 

{

  $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $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;

}

session_start();?>

2014-04-11 23:38:33

Edit:

phpkodlari.com © 2009 Herkes Php öğrenecek
Eglence ve Oyun: Gamikro