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

Ayuda Con Version Anterior De Mysql

Estas en el tema de Ayuda Con Version Anterior De Mysql en el foro de Bases de Datos General en Foros del Web. Holas a todos amigos del FORO. Tengo un problema, y necesito de su ayuda... el problema es el siguiente... estaba haciendo una web.. con BD ...
  #1 (permalink)  
Antiguo 30/07/2007, 18:25
Avatar de ikaroraul  
Fecha de Ingreso: octubre-2006
Ubicación: La Paz
Mensajes: 391
Antigüedad: 17 años, 7 meses
Puntos: 16
Ayuda Con Version Anterior De Mysql

Holas a todos amigos del FORO.
Tengo un problema, y necesito de su ayuda... el problema es el siguiente...
estaba haciendo una web.. con BD para lo cual lo hice en mi PC con el APPSERVER pero a la hora de sibir al server cuando saco mi SQL scritp para generar las TABLAS me dan errores... por lo q veo creo q son de VERSION pues la del HOST es una mas antigua a la de mi PC miren aqui una comparacion...

esta es la del HOST q contrate

Código PHP:
# phpMyAdmin MySQL-Dump
# version 2.5.1
# http://www.phpmyadmin.net/ (download page)
#
# Servidor: 172.16.253.90
# Tiempo de generación: 30-07-2007 a las 19:15:44
# Versión del servidor: 3.23.53
# Versión de PHP: 4.3.11
# Base de datos : `aveu6237`
# --------------------------------------------------------

#
# Estructura de tabla para la tabla `accesos`
#
# Creación: 30-07-2007 a las 18:58:40
# Última actualización: 30-07-2007 a las 18:58:40
#

CREATE TABLE `accesos` (
  `
idint(11NOT NULL default '0',
  `
usermasterint(11) default NULL,
  `
numuserint(11) default NULL,
  `
nickvarchar(20) default NULL,
  `
numsucint(11) default NULL,
  `
nombrevarchar(50) default NULL,
  `
nombreusvarchar(100) default NULL,
  `
estadovarchar(20) default NULL,
  
PRIMARY KEY  (`id`)
TYPE=MyISAM;

#
# Volcar la base de datos para la tabla `accesos`

ahora esta es la q genero en mi pc


Código PHP:
-- phpMyAdmin SQL Dump
-- version 2.9.0.2
-- http://www.phpmyadmin.net
-- 
-- 
Servidorlocalhost
-- Tiempo de generación30-07-2007 a las 19:02:35
-- Versión del servidor5.0.24
-- Versión de PHP4.4.4
-- 
-- 
Base de datos: `aveu6237`
-- 

-- --------------------------------------------------------

-- 
-- 
Estructura de tabla para la tabla `accesos`
-- 

CREATE TABLE `accesos` (
  `
idint(11NOT NULL auto_increment,
  `
usermasterint(11) default NULL,
  `
numuserint(11) default NULL,
  `
nickchar(20collate latin1_spanish_ci default NULL,
  `
numsucint(11) default NULL,
  `
nombrechar(50collate latin1_spanish_ci default NULL,
  `
nombreuschar(100collate latin1_spanish_ci NOT NULL,
  `
estadochar(20collate latin1_spanish_ci default NULL,
  
PRIMARY KEY  (`id`),
  
UNIQUE KEY `id` (`id`)
ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci AUTO_INCREMENT=;

-- 
-- 
Volcar la base de datos para la tabla `accesos`
-- 
bueno pues no se como arreglar esto ya que tengo varias tablas.. y crearlas en el server pues seria trabajo doble miren este es el SQL script q no me deja hacer funcionar...

Código PHP:
/*
Created        29/04/2007
Modified        16/07/2007
Project        
Model        
Company        
Author        
Version        
Database        mySQL 5 
*/

Create table usuarios (
    
usermaster Int DEFAULT 0,
    
numuser Int NOT NULL AUTO_INCREMENT,
    
nombre Char(100),
    
nick Char(20),
    
pass Char(20),
    
fecha Date,
    
descripcion Text,
    
status Char(20),
    
UNIQUE (numuser),
 
Primary Key (numuser)) ENGINE MyISAM;

Create table sucursales (
    
id Int NOT NULL AUTO_INCREMENT,
    
usermaster Int,
    
numsuc Int,
    
nombre Char(100),
    
descripcion Text,
    
UNIQUE (id),
 
Primary Key (id)) ENGINE MyISAM;

Create table accesos (
    
id Int NOT NULL AUTO_INCREMENT,
    
usermaster Int,
    
numuser Int,
    
nick Char(20),
    
numsuc Int,
    
nombre Char(50),
    
nombreus Char(100NOT NULL,
    
estado Char(20),
    
UNIQUE (id),
 
Primary Key (id)) ENGINE MyISAM;

Create table hostorial_accesos (
    
id Int NOT NULL AUTO_INCREMENT,
    
fechahora Datetime,
    
usermaster Int,
    
numuser Int,
    
nick Char(50),
    
nombreus Char(100),
    
numsuc Int,
    
nombre Char(50),
    
UNIQUE (id),
 
Primary Key (id)) ENGINE MyISAM;

Create table master100 (
    
id Int NOT NULL AUTO_INCREMENT,
    
usermaster Int,
    
codigo Char(50),
    
descripcion Char(100),
    
cantidaduni Float(10,2),
    
cantidad Float(10,1),
    
clasificacion Char(50),
    
costo Float(10,2),
    
precio_publico Float(10,2),
    
precio_mayorista Float(10,2),
    
precio_distribuidor Float(10,2),
    
precio_minorista Float(10,2),
    
estado Char(20),
 
Primary Key (id)) ENGINE MyISAM;

Create table transferencias (
    
id Int NOT NULL AUTO_INCREMENT,
    
usermaster Int,
    
numtransf Int,
 
Primary Key (id)) ENGINE MyISAM;

Create table trasnferencias100 (
    
id Int NOT NULL AUTO_INCREMENT,
    
usermaster Int,
    
numtrasnf Int,
    
fecha Date,
    
hora Time,
    
codigo Char(50),
    
descripcion Char(100),
    
cantidad Float(10,1),
 
Primary Key (id)) ENGINE MyISAM;

Create table sucursal101 (
    
id Int NOT NULL AUTO_INCREMENT,
    
usermaster Int,
    
numsuc Int,
    
codigo Char(50),
    
descripcion Char(100),
    
cantidaduni Float(10,2),
    
cantidad Float(10,2),
    
clasificacion Char(50),
    
costo Float(10,2),
    
precio_publico Float(10,2),
    
precio_mayorista Float(10,2),
    
precio_distribuidor Float(10,2),
    
precio_minorista Float(10,2),
    
estado Char(20),
 
Primary Key (id)) ENGINE MyISAM;

Create table folios101 (
    
id Int NOT NULL AUTO_INCREMENT,
    
numsuc Int,
    
numfolio Double(10,0),
    
nombreuser Char(100),
    
nombre Char(100),
    
clienteRFC Char(20),
    
direccion Char(100),
    
cp Int,
    
telefono Char(50),
    
email Char(100),
    
preciototal Float(10,2),
    
tipocliente Char(50),
 
Primary Key (id)) ENGINE MyISAM;

Create table ventas101 (
    
id Int NOT NULL AUTO_INCREMENT,
    
usermaster Int,
    
numsuc Int,
    
numfolio Double(10,0),
    
numuser Int,
    
nick Char(100),
    
fecha Date,
    
hora Time,
    
codigo Char(50),
    
descripcion Char(100),
    
unidades Float(10,2),
    
cantidad Float(10,2),
    
clasificacion Char(50),
    
preciounidad Float(10,2),
    
preciovendido Float(10,2),
    
estado Char(20),
    
tipocliente Char(50),
 
Primary Key (id)) ENGINE MyISAM;

Create table cancelar101 (
    
id Int NOT NULL AUTO_INCREMENT,
    
numsuc Int,
    
numfolio Double(10,0),
    
numuser Int,
    
nick Char(50),
    
fecha Date,
    
hora Time,
    
razon Text,
 
Primary Key (id)) ENGINE MyISAM;

Create table clientes (
    
id Int NOT NULL AUTO_INCREMENT,
    
numcliente Int,
    
nombre Char(100),
    
clienteRFC Char(20),
    
direccion Text,
    
cp Int,
    
telefono Char(25),
    
email Char(50),
    
numsuc Int,
    
fechaalta Date,
 
Primary Key (id)) ENGINE MyISAM;

Create table foliofact (
    
id Int NOT NULL AUTO_INCREMENT,
    
numsuc Int,
    
nombre Char(100),
    
numfact Double(10,0),
 
Primary Key (id)) ENGINE MyISAM;

Create table facturacion101 (
    
id Int NOT NULL AUTO_INCREMENT,
    
usermaster Int,
    
numsuc Int,
    
numfact Double(10,0),
    
numfolio Double(10,0),
    
numuser Int,
    
clienteRFC Char(20),
    
fecha Date,
    
hora Time,
    
estado Char(20),
 
Primary Key (id)) ENGINE MyISAM;

Create table cancelarfactura101 (
    
id Int NOT NULL AUTO_INCREMENT,
    
usermaster Int,
    
numsuc Int,
    
numfact Double(10,0),
    
numuser Int,
    
clienteRFC Char(20),
    
fecha Date,
    
hora Time,
    
razon Text,
 
Primary Key (id)) ENGINE MyISAM;

Create table inventario100 (
    
id Int NOT NULL AUTO_INCREMENT,
    
codigo Char(50),
    
cantidad Float(10,2),
 
Primary Key (id)) ENGINE MyISAM
Cuendo lo ejecuto en el HOST q contrate pues me da este error:

Código PHP:
Error

consulta SQL 
:  

CREATE TABLE `accesos` (

`
idint11 NOT NULL AUTO_INCREMENT ,
`
usermasterint11 ) default NULL ,
`
numuserint11 ) default NULL ,
`
nickchar20 collate latin1_spanish_ci default NULL ,
`
numsucint11 ) default NULL ,
`
nombrechar50 collate latin1_spanish_ci default NULL ,
`
nombreuschar100 collate latin1_spanish_ci NOT NULL ,
`
estadochar20 collate latin1_spanish_ci default NULL ,
PRIMARY KEY ( `id` ) ,
UNIQUE KEY `id` ( `id` ) 
)
ENGINE MYISAM DEFAULT CHARSET latin1 COLLATE latin1_spanish_ci 

MySQL ha dicho



You have an error in your SQL syntax near 'collate latin1_spanish_ci default NULL,
  `numsuc` int(11) default NULL,
  `no' 
at line 5 
Y asi saltan los problemas... pero el MISMO SCRITP FUNCIONA a la perfenccion en mi PC.

Bueno porfavor ayudenme a solucionar este problema como debo de hacerlo

GRACIAS DE ANTEMANO
  #2 (permalink)  
Antiguo 31/07/2007, 07:53
Avatar de Nano_  
Fecha de Ingreso: febrero-2006
Ubicación: Bogotá, Colombia
Mensajes: 1.866
Antigüedad: 18 años, 2 meses
Puntos: 96
Re: Ayuda Con Version Anterior De Mysql

Saludos Tienes que cambiar el ENGINE por type y si no estoy mal tambien quitar el DEFAULT no recuerdo bien, prueba y si algo nos comentas.

Cita:
CREATE TABLE `accesos` (
`id` int(11) NOT NULL auto_increment,
`usermaster` int(11) default NULL,
`numuser` int(11) default NULL,
`nick` char(20) collate latin1_spanish_ci default NULL,
`numsuc` int(11) default NULL,
`nombre` char(50) collate latin1_spanish_ci default NULL,
`nombreus` char(100) collate latin1_spanish_ci NOT NULL,
`estado` char(20) collate latin1_spanish_ci default NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) TYPE=MyISAM CHARSET=latin1 COLLATE=latin1_spanish_ci AUTO_INCREMENT=1 ;

Hasta Pronto!
__________________
:.:Nano.:: @nano_hard - Retornando al foro
  #3 (permalink)  
Antiguo 02/08/2007, 18:20
Avatar de ikaroraul  
Fecha de Ingreso: octubre-2006
Ubicación: La Paz
Mensajes: 391
Antigüedad: 17 años, 7 meses
Puntos: 16
De acuerdo Re: Ayuda Con Version Anterior De Mysql

Si Tienes RAZON... ahora si funciona... jejeje....
Bueno pero hay algun programa q haga eso de forma automatica???
claro es simple cambiarlo con un Reemplazar... pero q pasa si es otra version??? si es que existe algun programa pues porfavor me dicen el NOMBRE
Saludos y gracias por TODO
Sos un masteR
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 06:25.