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 '9223372036854775807 SET = '9223372036854775807'' at line 1
¿Que error tengo en la sintaxis?
(No tiene nada que ver con el topico anterior, asi que por favor no lo borren ;))
Las lineas donde esta el codigo que lanza error es de la 119 a la 130
Código php:
Ver original
<?php # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_TecnoPets = "mysql.webcindario.com"; $database_TecnoPets = "*********"; $username_TecnoPets = "*********"; $password_TecnoPets = "*********"; $TecnoPets = mysql_pconnect($hostname_TecnoPets, $username_TecnoPets, $password_TecnoPets) or trigger_error(mysql_error(),E_USER_ERROR); ?> <?php } $MM_authorizedUsers = ""; $MM_donotCheckaccess = "true"; // *** Esto es para restringir el acceso a la pagina function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { // Por seguridad, primeramente, el visitante no podra entrar $isValid = False; // La varable de sesion es como el usuario si el esta logeado // Y sino, se queda en blanco. // $isValid = true; } // $isValid = true; } if (($strUsers == "") && true) { $isValid = true; } } return $isValid; } $MM_restrictGoTo = "/logeo.php"; if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) { $MM_qsChar = "?"; $MM_referrer = $_SERVER['PHP_SELF']; $MM_referrer .= "?" . $QUERY_STRING; exit; } ?> <?php function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { } $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": break; case "double": break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $colname_dat = "-1"; $colname_dat = $_SESSION['MM_Username']; } $query_dat = sprintf("SELECT * FROM tecnopoints WHERE usuario = %s", GetSQLValueString($colname_dat, "text")); $colname_banco = "-1"; $colname_banco = $_SESSION['MM_Username']; } $query_banco = sprintf("SELECT * FROM banco WHERE usuario = %s", GetSQLValueString($colname_banco, "text")); ?> <!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>Documento sin título</title> <link href="/estilo.css" rel="stylesheet" type="text/css" /> </head> <body> <p> <? if($_POST[ag] > $row_dat[tp]) { echo " No tienes tantos TP "; } else { $yu = $row_dat[tp] - $_POST[ag]; $ya = $row_banco[tp] + $_POST[ag]; $montito = "UPDATE $row_dat[tp] SET = '$yu'"; $banqi = "UPDATE $row_banco[tp] SET = '$ya'"; }; ?> </p> <p><a href="/index.php" target="_top">ACTUALIZAR DATOS</a></p> </body> </html>