Si uso eso me sale esto:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/programasphp/listado.php on line 11
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Resource id #4' at line 1
Esta es mi base de datos:
Código PHP:
--
-- Estructura de tabla para la tabla `informe`
--
CREATE TABLE IF NOT EXISTS `informe` (
`ruta` text COLLATE latin1_spanish_ci NOT NULL COMMENT 'Ruta del fichero',
`fichero` text COLLATE latin1_spanish_ci NOT NULL COMMENT 'Nombre del fichero',
`espaciokb` int(11) NOT NULL,
`num_pags` tinyint(4) NOT NULL,
`fecha` date NOT NULL COMMENT 'Fecha del diario',
`texto` int(11) NOT NULL COMMENT 'Texto del diario',
`indexado` tinyint(1) NOT NULL DEFAULT '0',
`cotejado` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci COMMENT='Tabla almacenar diarios';
--
-- Volcar la base de datos para la tabla `informe`
--
INSERT INTO `informe` (`ruta`, `fichero`, `espaciokb`, `num_pags`, `fecha`, `texto`, `indexado`, `cotejado`) VALUES
('/ruta/', 'asasas.pdf', 323, 2, '2010-01-15', 0, 0, 0);