Foros del Web » Programación para mayores de 30 ;) » Bases de Datos General »

ayuda. creacion de una bd..error de sintaxis, no se porq

Estas en el tema de ayuda. creacion de una bd..error de sintaxis, no se porq en el foro de Bases de Datos General en Foros del Web. saludos... estoy instalando un modulo, pero antes crear un par de tablas, estoy usando el MysqCC, pero cuando ejecuto el la sintaxis, me sale un ...
  #1 (permalink)  
Antiguo 10/08/2005, 15:08
 
Fecha de Ingreso: agosto-2003
Ubicación: santiago, chile
Mensajes: 303
Antigüedad: 20 años, 8 meses
Puntos: 0
ayuda. creacion de una bd..error de sintaxis, no se porq

saludos...
estoy instalando un modulo, pero antes crear un par de tablas, estoy usando el MysqCC, pero cuando ejecuto el la sintaxis, me sale un error,

aca el codigo>
Código:

# $Id: latest_news.sql,v 1.3 2002/11/11 06:24:04 will Exp $
# Create the table to hold the latest news.
CREATE TABLE latest_news (
   news_id int(11) DEFAULT '0' NOT NULL auto_increment,
   headline varchar(255) NOT NULL,
   content text NOT NULL,
   date_added datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
   status tinyint(1) DEFAULT '0' NOT NULL,
   PRIMARY KEY (news_id)
);

# Insert some test data
INSERT INTO latest_news (
   headline,
   content,
   date_added,
   status
   ) VALUES (
   'Latest News v1.1.0',
   'If you can see this message, you have successfully installed the \'Latest News\' contribution for osCommerce. Visit the administration area to remove this news item and add your own!',
   now(),
   1
   );

# Insert configuration items into the configuration table.
INSERT INTO configuration (
   configuration_title,
   configuration_key,
   configuration_value,
   configuration_description,
   configuration_group_id,
   date_added
   ) VALUES (
   'Latest News',
   'MAX_DISPLAY_LATEST_NEWS',
   3,
   'maximum number of items to display in the Latest News box',
   3,
   NOW()
   );
error:

[localhost] error 1067: Invalid default value for 'mews_id'
[localhost] errpr 1146: table 'os.latest_news' doesn't exist

se agradece la ayuda
  #2 (permalink)  
Antiguo 10/08/2005, 15:55
 
Fecha de Ingreso: junio-2005
Mensajes: 63
Antigüedad: 18 años, 10 meses
Puntos: 0
no estoy seguro pero
no funciona quitandole el deault '0' a news_id?
  #3 (permalink)  
Antiguo 10/08/2005, 19:01
 
Fecha de Ingreso: agosto-2003
Ubicación: santiago, chile
Mensajes: 303
Antigüedad: 20 años, 8 meses
Puntos: 0
vale, era eso.
sin el default
...
news_id int(11) NOT NULL auto_increment,
...


nos vemos
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 05:38.