 
			
				08/08/2008, 01:23
			
			
			     |  
        |     |    |    Fecha de Ingreso: junio-2008  
						Mensajes: 21
					  Antigüedad: 17 años, 4 meses Puntos: 0     |        |  
  |      Respuesta: desplegar catalogo por categorias        mi tabla de productos    
create table producto 
( 
  id_p integer AUTO_INCREMENT, 
  nombre varchar(30), 
  cantidad integer, 
  precio integer, 
  url varchar(50), 
  categoria varchar(50), 
  constraint pk_producto primary key(id_p) 
);      
y esto es lo que tengo de php y no se si este bien     
<html> 
<head> 
<?php 
session_start(); 
$_SESSION["id_u"]; 
$_SESSION["nom_usu"]; 
$_SESSION["login"]; 
$con=mysql_connect("localhost","root",""); 
$bd=mysql_select_db("tienda_plas",$con); 
$qry=mysql_query("select * from producto where categoria='$cat' "); 
$con=mysql_connect("localhost","root","");							  
   mysql_select_db("tienda_plas",$con);							 
   $consu="select * from ventas " 
   $resu = mysql_query($consu); 
   $con="insert ventas( id ,total) value('venta','0')" 
   $res=mysql 
   while($reg=mysql_fetch_array($resu)) 
    { 
    $venta++; 
    } 
venta++;   
while($row=mysql_fetch_array($qry)) 
?> 
<title> Productos de Plastitrim</title> 
</head> 
<body bgcolor="#CCCCCC"> 
<form name="categorias" method="post" action="productocategoria.php"> 
<input type="hidden" name="uno" value=""> 
<table width="760" border=0 cellspacing=20>   
<tr> 
<th width="718"  ALIGN=LEFT><p><img src="exel.JPG" width=89% height="84"  heigth=20%> 
  <input type="submit" name="exel" value=""> 
</p> 
  </p> 
<tr> 
<th height="84"  ALIGN=LEFT><img src="separadox.JPG" width=89% height="69" heigth=20%>  
<input type="submit" name="separadox" value=""> 
<tr> 
<th ALIGN=LEFT><img src="smart home.JPG" width=89% height="57"  heigth=20%>   
<input type="submit" name="samart_home" value=""> 
<tr> 
<th  ALIGN=LEFT><img src="tira trim.JPG" width=89% height="69"  heigth=20%>  
<input type="submit" name="tira" value=""> 
</table> 
</form> 
</body>   
</html>     
y de ahi en mas no se que hacer gracias           |