Bienvenido a datoweb.com!! En este foro podrás encontrar ayuda sobre diseño y desarrollo web en general. Si quieres formar parte de esta comunidad para pedir ayuda o colaborar ayudando a otros usuarios del foro solo tienes que registrarte desde el siguiente enlace: Registrarse en el Foro

Problemas en la version de PHP Version 5.5.38

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
1789
Visitas
3
Resp
Por pablo hace 90 meses
Experto
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 90 meses
Administrador
Respuesta #2
es mas enseña en código de inc/loguin.php y lo miramos juntos salu2
0
Puntos
Por alber hace 90 meses
Administrador
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 90 meses
Experto
Compartir en facebook
Compartir en twitter
Compartir
Para comentar Inicia sesión o Registrate