Ver Mensaje Individual
  #3 (permalink)  
Antiguo 22/01/2009, 21:01
lauchalp95
 
Fecha de Ingreso: julio-2006
Mensajes: 254
Antigüedad: 18 años, 8 meses
Puntos: 0
Respuesta: No toma la consulta..

Ok y muchas gracias por responder..
La cosa es asi:
Tengo este php:
Código PHP:
<?php
CONEXION
.
?>
<?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 "'" "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;
}
}

$colname_Recordset1 "-1";
if (isset(
$_SESSION['MM_Username'])) {
  
$colname_Recordset1 $_SESSION['MM_Username'];
}
mysql_select_db($database_Noone$Noone);
$query_Recordset1 sprintf("SELECT * FROM banco WHERE usuario = %s"GetSQLValueString($colname_Recordset1"text"));
$Recordset1 mysql_query($query_Recordset1$Noone) or die(mysql_error());
$row_Recordset1 mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 mysql_num_rows($Recordset1);
?>
Y luego en una parte doy este codigo:
Código PHP:
<? 
if($row_Recordset1['nooney'] > 99)
{
    
$jugamos si;
    echo 
" Tienes suficientes Nooney para pagar el boleto valuado en 100 Nooney ";
}
else
{
    
$jugamos no;
    echo 
" No puedes jugar ya que no tienes 100 Nooney ";
}
?>
Y aunque yo tengo 100000 Nooney me sigue diciendo que no tengo mas de 100 Nooney