Jump to content
php.lv forumi

Logins MySql


RaaapuLis

Recommended Posts

Aizmirsu pateikt ka esmu galigs n00bs mysql, tapec nezinu ko darit. Neesiet bargi :/

 

1. a ka nomainit? :(

2. Jap, tabulas neizveidojas, errors te ->

SQL vaicājums: 

CREATE TABLE `keys` (
`user_id` int( 11 ) NOT NULL AUTO_INCREMENT ,
`key` varchar( 32 ) NOT NULL DEFAULT '',
PRIMARY KEY ( `user_id` ) 
) ENGINE = MYISAM DEFAULT CHARSET = latin1 

CREATE TABLE `messages` (
`id` int( 11 ) NOT NULL AUTO_INCREMENT ,
`from` varchar( 255 ) NOT NULL DEFAULT '0',
`to` varchar( 255 ) NOT NULL DEFAULT '0',
`message` longtext NOT NULL ,
`title` varchar( 255 ) NOT NULL DEFAULT '',
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
`read` int( 1 ) NOT NULL DEFAULT '0',
PRIMARY KEY ( `id` ) 
) ENGINE = MYISAM DEFAULT CHARSET = latin1 

CREATE TABLE `users` (
`id` int( 11 ) NOT NULL AUTO_INCREMENT ,
`username` varchar( 255 ) NOT NULL DEFAULT '',
`password` varchar( 32 ) NOT NULL DEFAULT '',
`name` varchar( 255 ) NOT NULL DEFAULT '',
`email` varchar( 255 ) NOT NULL DEFAULT '',
`ip` varchar( 255 ) NOT NULL DEFAULT '',
`admin` int( 1 ) NOT NULL DEFAULT '0',
PRIMARY KEY ( `id` ) 
) ENGINE = MYISAM DEFAULT CHARSET = latin1 

MySQL teica:  
#1064 - 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 'CREATE TABLE `messages` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`from` varchar' at line 7

Edited by RaaapuLis
Link to comment
Share on other sites

×
×
  • Create New...