danmoracr escribió:
Como está generando la consulta SQL?
Código PHP :
<?php require_once('Connections/ventasonline.php'); ?>
<?php require_once('Connections/ventasonline.php'); ?>
<?php require_once('Connections/ventasonline.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;
}
}
?>
<?php
$varUsuarioP_ConsultaVendedor = "0";
if (isset($_GET["MM_IdUsuario"])) {
  $varUsuarioP_ConsultaVendedor = $_GET["MM_IdUsuario"];
}
mysql_select_db($database_ventasonline, $ventasonline);
$query_ConsultaVendedor = sprintf("SELECT usuario.strusuario, usuario.stremail, usuario.strpassword, usuario.strdireccion, usuario.strlocalidad, usuario.strProvincia FROM usuario WHERE usuario.idUsuario = %s", GetSQLValueString($varUsuarioP_ConsultaVendedor, "int"));
$ConsultaVendedor = mysql_query($query_ConsultaVendedor, $ventasonline) or die(mysql_error());
$row_ConsultaVendedor = mysql_fetch_assoc($ConsultaVendedor);
$totalRows_ConsultaVendedor = mysql_num_rows($ConsultaVendedor);
$varUsuarioP_ConsultaVendedor = "0";
if (isset($_SESSION["MM_IdUsuario"])) {
  $varUsuarioP_ConsultaVendedor = $_SESSION["MM_IdUsuario"];
}
mysql_select_db($database_ventasonline, $ventasonline);
$query_ConsultaVendedor = sprintf("SELECT usuario.strusuario, usuario.stremail, usuario.strpassword, usuario.strdireccion, usuario.strlocalidad, usuario.strProvincia FROM usuario WHERE usuario.idUsuario = %s", GetSQLValueString($varUsuarioP_ConsultaVendedor, "int"));
$ConsultaVendedor = mysql_query($query_ConsultaVendedor, $ventasonline) or die(mysql_error());
$row_ConsultaVendedor = mysql_fetch_assoc($ConsultaVendedor);
$totalRows_ConsultaVendedor = mysql_num_rows($ConsultaVendedor);
$varVend_ConsProvVend = "0";
if (isset($_POST["MM_IdUsuario"])) {
  $varVend_ConsProvVend = $_POST["MM_IdUsuario"];
}
mysql_select_db($database_ventasonline, $ventasonline);
$query_ConsProvVend = sprintf("SELECT provincias.strdescripcion FROM provincias WHERE provincias.idProvincias = %s", GetSQLValueString($varVend_ConsProvVend, "int"));
$ConsProvVend = mysql_query($query_ConsProvVend, $ventasonline) or die(mysql_error());
$row_ConsProvVend = mysql_fetch_assoc($ConsProvVend);
$totalRows_ConsProvVend = mysql_num_rows($ConsProvVend);
$varUsuaro_productosvendedor = "0";
if (isset($_GET["MM_IdUsuario"])) {
  $varUsuaro_productosvendedor = $_GET["MM_IdUsuario"];
}
mysql_select_db($database_ventasonline, $ventasonline);
$query_productosvendedor = sprintf("SELECT clasificado.strclasificado FROM clasificado WHERE clasificado.strautor = %s", GetSQLValueString($varUsuaro_productosvendedor, "int"));
$productosvendedor = mysql_query($query_productosvendedor, $ventasonline) or die(mysql_error());
$row_productosvendedor = mysql_fetch_assoc($productosvendedor);
$totalRows_productosvendedor = mysql_num_rows($productosvendedor);
?>