Foros del Web » Programando para Internet » PHP »

AYUDA: Argumento Invalido

Estas en el tema de AYUDA: Argumento Invalido en el foro de PHP en Foros del Web. Saludos, tengo un problema mi buscador secundario funcionaba bien hasta q le hice una modificacion solo de estetica y me arroja estos errores Warning: mysql_fetch_assoc(): ...
  #1 (permalink)  
Antiguo 24/09/2007, 13:30
Avatar de T4ke0veR  
Fecha de Ingreso: agosto-2007
Ubicación: Quito - Ecuador
Mensajes: 1.720
Antigüedad: 16 años, 8 meses
Puntos: 28
AYUDA: Argumento Invalido

Saludos, tengo un problema mi buscador secundario funcionaba bien hasta q le hice una modificacion solo de estetica y me arroja estos errores

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/indexa/public_html/vicson/htmleng/ficha_prod.php on line 14

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/indexa/public_html/vicson/htmleng/ficha_prod.php on line 97

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/indexa/public_html/vicson/htmleng/ficha_prod.php on line 117

ficha_prod.php
Código PHP:
<?php include ('conect.php');
$date=date('Y-n-d G:i:s');
@
$Id_articulo=$_REQUEST['Id_articulo'];

$sql="SELECT * FROM articulos WHERE Id_articulo= $Id_articulo";
$sql_exec=mysql_query($sql);

$sqlq="SELECT * FROM atributos WHERE Id_articulo=$Id_articulo ORDER BY id_atributo ASC";
$sql_execq=mysql_query($sqlq);

$sqlqz="SELECT * FROM specs WHERE Id_articulo=$Id_articulo ORDER BY id_spec ASC";
$sql_execqz=mysql_query($sqlqz);

while(
$row=mysql_fetch_assoc($sql_exec)){
    
    
$Id_categoria $row['Id_categoria'];
    
$Id_sub_categoria $row['Id_sub_categoria'];
    
$nombre $row['nombre'];
    
$presentacion $row['presentacion'];
    
$descripcion $row['descripcion'];
    
$pic $row['pic'];
    }
?><!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>VICSON, C.A. LA PLANTA DEL ALAMBRE</title>
<style type="text/css">
<!--
body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<link href="estilos.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
<!--
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
<style type="text/css">
<!--
.style1 {
    font-size: 10px;
    font-family: Tahoma;
}
-->
</style>
</head>

<body>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','750','height','229','src','arriba?sc=3','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','arriba?sc=3' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="750" height="229">
      <param name="movie" value="arriba.swf?sc=3" />
      <param name="quality" value="high" />
      <embed src="arriba.swf?sc=3" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="750" height="229"></embed>
    </object></noscript></td>
  </tr>
  <tr>
    <td><img src="imagenes/p3_pr_c.jpg" width="750" height="36" /></td>
  </tr>
  <tr>
    <td height="500" valign="top"><br />
      <table width="743" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="743" class="azulgris_verd_nrm"><a href="p3_pr.php">Volver al listado de productos </a></td>
      </tr>
    </table>
      <br />
    <table width="82%" border="0" align="center">
      <tr>
        <td colspan="3" class="azul_verd_nrm"><span class="azulgrs_tah"><strong>
          <?=$nombre?>
        </strong></span></td>
        <td width="38%" rowspan="4" valign="top" class="gris_tah_nrm"><div align="center"><img src="<?=$pic?>" width="150" height="150" alt="" /></div></td>
      </tr>
      <tr>
        <td colspan="3" class="azul_verd_nrm"><strong>
          <?=$presentacion?>
        </strong></td>
      </tr>
      <tr>
        <td colspan="3" class="azul_verd_nrm"><span class="azulgrs_tah">
          <?php echo nl2br($descripcion);?>
        </span></td>
        </tr>
      <tr>
        <td colspan="3" valign="top" class="azul_verd_nrm"><table width="422" border="0" align="left" cellpadding="0" cellspacing="0">
            <tr>
              <td width="432"><br />
                  <table width="260" border="0" align="center" cellpadding="0" cellspacing="0" class="azulgrs_tah">
                    <?php while($rowq=mysql_fetch_array($sql_execq)){?>
                    <tr>
                      <td width="159">
                        <div align="left">
                          <?=$rowq['nombre']?>
                          </div></td>
                      <td width="51"><div align="center">
                          <?=$rowq['medida']?>
                      </div></td>
                      <td width="50"><div align="center">
                          <?=$rowq['nomenclatura']?>
                      </div></td>
                    </tr>
                    <?php }?>
                  </table>
                <br />              </td>
            </tr>
            <tr>
              <td><table width="410" border="0" align="center" cellpadding="0" cellspacing="0" class="azulgrs_tah">

                <?php while($rowqz=mysql_fetch_array($sql_execqz)){?>
                <tr class="negro_verd_nrm">
                  <td width="109">
                      <div align="left">
                        <?=$rowqz['titulo']?>
                          </div></td>
                  <td width="343">
                    <div align="left">
                      <?=$rowqz['detalle']?>
                        </div></td>
                </tr>
                <?php }?>
              </table></td>
            </tr>
            <tr>
              <td><table width="192" border="0" align="right" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="32" align="center"><img src="imagenes/btn_imp.gif" alt="" width="20" height="17" onclick="MM_callJS('print();')" /></td>
                  <td width="43"><a href="#" class="blancopeq_tah" onclick="MM_callJS('print();')">Imprimir</a></td>
                  <td width="10">&nbsp;</td>
                  <td width="65">&nbsp;</td>
                  <td width="26" align="center"><img src="imagenes/btn_mail.gif" width="19" height="12" /></td>
                  <td width="39" class="azulclr_tah_peq"><a href="#" class="azulclr_tah_peq" onclick="MM_openBrWindow('enviara.php?tomaurl=<?=$tomaurl?>','Enviar','status=yes,width=350,height=350')">Enviar</a></td>
                  <td width="42">&nbsp;</td>
                </tr>
              </table></td>
            </tr>
        </table></td>
        </tr>
    </table>
    <br /></td>
  </tr>
  
  
  <tr>
    <td height="30" colspan="2" valign="middle" bgcolor="#EEEEEE" class="gris_tah_nrm"><table width="719" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="484" align="left">&copy;2007 Todos los derechos reservados. Vicson La Planta del Alambre&nbsp;&nbsp;  |&nbsp;&nbsp;  <a href="http://www.indexa.com.ve" target="_blank" class="gris_tah_nrm">Desarrollado por Indexa</a></td>
                <td width="249" align="right">&nbsp;</td>
        </tr>
            </table></td>
  </tr>
  <tr>
    <td height="63" align="center" class="gris_tah"><span class="style1"><a href="p1_qs.php" class="gris_tahlink">Empresa</a> &nbsp;|&nbsp; <a href="p2_dst.php" class="gris_tahlink">Distribuidores</a> &nbsp;|&nbsp; <a href="p3_pr.php" class="gris_tahlink">Productos</a> &nbsp;|&nbsp; <a href="p7_cdm.php" class="gris_tahlink">Consulta t&eacute;cnica</a> &nbsp;|&nbsp; <a href="p8_uev.php" class="gris_tahlink">Unete al equipo Vicson</a> &nbsp;|&nbsp; <a href="p9_ium.php" class="gris_tahlink">Instalelo ud. mismo</a><br />
      <br />
    <a href="p10_nt.php" class="gris_tahlink">Noticias</a> &nbsp;|&nbsp; <a href="p10_ev.php" class="gris_tahlink">Eventos</a> &nbsp;|&nbsp; <a href="p10_blt.php" class="gris_tahlink">Novedades</a> &nbsp;|&nbsp; <a href="p4_sg.php" class="gris_tahlink">Sugerencias</a> &nbsp;|&nbsp; <a href="p5_cnt.php" class="gris_tahlink">Contactos</a></span></td>
  </tr>
</table>
</body>
</html>
  #2 (permalink)  
Antiguo 24/09/2007, 13:47
 
Fecha de Ingreso: febrero-2006
Mensajes: 858
Antigüedad: 18 años, 2 meses
Puntos: 4
Re: AYUDA: Argumento Invalido

pon un @ en las lineas que te sale... hay varias partes en que no tienes tus variables definidas

cuidado con juntas html con php y pones <?=$nombre...

se debe poner <? y dejas un espacio y luego lo que quieras..

saludos
__________________
*La amistad se multiplica cuando se divide*
  #3 (permalink)  
Antiguo 24/09/2007, 13:49
Avatar de T4ke0veR  
Fecha de Ingreso: agosto-2007
Ubicación: Quito - Ecuador
Mensajes: 1.720
Antigüedad: 16 años, 8 meses
Puntos: 28
Re: AYUDA: Argumento Invalido

un arroba al inicio??? o en q sitio???
  #4 (permalink)  
Antiguo 24/09/2007, 14:08
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 17 años, 11 meses
Puntos: 2135
Re: AYUDA: Argumento Invalido

Prueba asi en todos tus mysql_query:
Código PHP:
$sql="SELECT * FROM articulos WHERE Id_articulo= $Id_articulo";
$sql_exec=mysql_query($sql) or die( "Error en Query: $sql, error: " mysql_error() ); 
Esto te mostrara el error que tienes y lo podras reparar.

Saludos.
  #5 (permalink)  
Antiguo 24/09/2007, 14:47
Avatar de T4ke0veR  
Fecha de Ingreso: agosto-2007
Ubicación: Quito - Ecuador
Mensajes: 1.720
Antigüedad: 16 años, 8 meses
Puntos: 28
Re: AYUDA: Argumento Invalido

me sigue dando el mismo error... verifiquenlo ustedes aqui
www.indexa.com.ve/vicson usen el buscador con menu de seleccion multiple y veran
  #6 (permalink)  
Antiguo 24/09/2007, 14:52
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 17 años, 11 meses
Puntos: 2135
Re: AYUDA: Argumento Invalido

No haz probado el codigo que publique, debes de poner en lugar de tus querys actuales para que puedas ver el error.

Saludos.
  #7 (permalink)  
Antiguo 24/09/2007, 15:05
Avatar de T4ke0veR  
Fecha de Ingreso: agosto-2007
Ubicación: Quito - Ecuador
Mensajes: 1.720
Antigüedad: 16 años, 8 meses
Puntos: 28
Re: AYUDA: Argumento Invalido

ahmmmm me dio otra nota diferente .. dejame chekar y les comento!!!!
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 03:26.