hola buenas estoy teniendo problemas al hacer un GETSTRING en una consulta de mysql con php
osea que me aparece un error en el fichero de funciones

codigo
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;
	}
}
1
Puntos
1741
Visitas
3
Resp
Por pablo hace 9 años
Master
Respuesta #1
creo que el error lo estas teniendo tu a la hora de ejecutar la función, en el mensaje te dice que necesita un segundo argumento es decir el tipo (type)

si ejecutas la función de esta manera:
GetSQLValueString("cadena");
tendrás el error, pero si lo haces pasando el tipo en teoría no:
GetSQLValueString("cadena","text");
prueba y nos cuentas ;)
1
Puntos
Por alber hace 9 años
Admin
Respuesta #2
es mas enseña en código de inc/loguin.php y lo miramos juntos salu2
0
Puntos
Por alber hace 9 años
Admin
Respuesta #3
dale gracias albert
era la version de php que no era compatible o nose. el fin le intale la version que haz posteado hace un tiempo como descargar servidor xampp o web

gracias por tu aporte
1
Puntos
Por pablo hace 9 años
Master
Para comentar Inicia sesión o Regístrate
Phpres 2025@ All rights reserved.
Utilizamos cookies para mejorar la navegación en el sitio. Más información Aceptar