Ver Mensaje Individual
  #3 (permalink)  
Antiguo 19/03/2005, 01:05
ThunderFx
 
Fecha de Ingreso: diciembre-2003
Ubicación: Campehce, Mexico
Mensajes: 325
Antigüedad: 20 años, 4 meses
Puntos: 0
A ver aqui esta la sql
Cita:
CREATE TABLE productos (
id int NOT NULL auto_increment,
titulo text NOT NULL,
seccion text NOT NULL,
descripcion text NOT NULL,
detalle text NOT NULL,
precio varchar(10) NOT NULL,
autor text NOT NULL,
imagen longblob NOT NULL,
tipo varchar(50) NOT NULL default '',
PRIMARY KEY (id)
) TYPE = MyISAM;

CREATE TABLE promociones (
id int NOT NULL auto_increment,
id_promo varchar(4) NOT NULL,
fecha_cad date NOT NULL,
PRIMARY KEY (id)
) TYPE = MyISAM;
y El codigo del archivo es:

Cita:
<?

include("conexion.php");

$select = "SELECT id, titulo, imagen, id_promo FROM productos, promociones WHERE id=id_promo and fecha_cad<fecha";
mysql_query($select);

echo "<span style='font-size: 8pt' lang='es'><a href='?ID=leer&id=$row[id]'>Detalle</a></span></font></td>";

?>
Ojala y me hechen la mano