
19th July 2006, 02:01
|
|
Junior Member
|
|
Join Date: Feb 2006
Location: Napoli
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Mysql auto_increment
I run a site powered by joomla cms on a debian sarge 3.1 2.6 with apache-ssl.After the first user registration Mysql is giving this error after a user registration
Code:
mosuser::store failed<br/>Unknown column 'activation' in 'field list' SQL=INSERT INTO jost_users(
'id','name','username','email','password','usertype','block','gid','registerDate','activation')VALUES('0','maria','maria@gabrix.ath.cx','27b4b5b01b0d1fcab2046369720ff75e','','1','18','2006-07-16 19:41:51','937099cfec294262792a285909b41725')
In a forum i found out remove the id column and the '0' value after i inserted this code
Code:
mysql> ALTER TABLE jos_users MODIFY id MEDIUMINT NOT NULL AUTO_INCREMENT;
This is the second query
Code:
mysql> INSERT INTO jos_users('name','username','email','password','usertype','block','gid','registerDate')VALUES('maria','maria','maria@gabrix.ath.cx','27b4b5b01b0d1fcab2046369720ff75e','','1','18','2006-07-1804:55:00','51805edae6e5131c6f6d7941e9add048')
-> describe jos_users; ERROR 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 ''name','username','email','password','usertype','block','gid','
What are the proper values i have to insert ?
Do they have to be related to an existent user or i have to register a new user straight into Mysql with the new values?
In this case what values are going to be for 'password','usertype','block','gid' ...
I know nothing of sql i will soon read a guide but now users cannot register to my site,and it's more than 2 weeks i'm after this problem.
I invite you to try register to my site and see the error message from live https://www.gabrix.ath.cx
Thanks!
Last edited by gabriele; 19th July 2006 at 02:08.
|

20th July 2006, 12:26
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
You must change
Code:
INSERT INTO jos_users('name','username','email','password','usertype','block','gid','registerDate')VALUES('maria','maria','maria@gabrix.ath.cx','27b4b5b01b0d1fcab2046369720ff75e','','1','18','2006-07-1804:55:00','51805edae6e5131c6f6d7941e9add048')
to
Code:
INSERT INTO jos_users(name,username,email,password,usertype,block,gid,registerDate) VALUES('maria','maria','maria@gabrix.ath.cx','27b4b5b01b0d1fcab2046369720ff75e','','1','18','2006-07-1804:55:00')
The columns must not have ' signs around them, and in VALUES you have one more value than you have columns, so I removed the last value.
|

20th July 2006, 13:05
|
|
Local Meanie
|
|
Join Date: Apr 2006
Location: Switzerland
Posts: 1,046
Thanks: 4
Thanked 34 Times in 32 Posts
|
|
Why not just reinstalling joomla in a different db or with a different prefix and look at the differences?
|

20th July 2006, 17:38
|
|
Junior Member
|
|
Join Date: Feb 2006
Location: Napoli
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Code:
mysql> INSERT INTO jos_users(name,username,email,password,usertype,block,gid,registerDate) VALUES('maria','maria','maria@gabrix.ath.cx','27b4b5b01b0d1fcab2046369720ff75e','','1','18','2006-07-1804:55:00')
-> describe jos_users; ERROR 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 'describe jos_users' at line 2
there is a discussion on this at LQforum http://www.linuxquestions.org/questi...d.php?t=463251
I have tryied myself with this code and it is gone a bit better but the error message stayied the same when you register at my site https://www.gabrix.ath.cx try yourself ...
Code:
mysql> INSERT INTO jos_users(name,username,email,password,usertype,block,gid,registerDate)VALUES('maria','maria','maria@gabrix.ath.cx','949d68ce38121db707017970fc91711a','','1','18','2006-07-19 10:21:07');
Query OK, 1 row affected (0.00 sec)
Your code looks wrong in the registerDate colomn.
Last edited by gabriele; 20th July 2006 at 17:42.
|

20th July 2006, 18:48
|
|
Junior Member
|
|
Join Date: Feb 2006
Location: Napoli
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
The news are : with the above code 'Query OK' the user got registred so i guess defintly it is not a mysql problem but joomla.
It's complaining about column 'activation' in ''field list'.
I can delete that column giving a new query with no 'activation' into it,right ?
Or there is an another way ...
The query OK , had no 'activation' in it,so why it's still complaining?????????????
I'm getting confused ....
By the way you can all give it a try https://www.gabrix.ath.cx
This is not an advertisement!
Last edited by gabriele; 20th July 2006 at 18:57.
|

21st July 2006, 13:19
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
I don't know Joomla, so I guess you have to review the sources to see where you can change what...
|

22nd July 2006, 06:55
|
|
Junior Member
|
|
Join Date: Feb 2006
Location: Napoli
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
That's the table jos_users.It has the auto_increment set:
Code:
mysql> describe jos_users;
+-----------------------+-----------------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------------+-----------------------+------+-----+---------------------+----------------+
| id | mediumint(9) | | PRI | NULL | auto_increment |
I insert the new coloms and values into it:
Code:
mysql> INSERT INTO jos_users(name,username,email,password,usertype,block,gid,registerDate)VALUES('ciro','ciro','ciro@gabrix.ath.cx','949d68ce38121db707017970fc91711a','','1','18','2006-07-19 10:21:07');
Query OK, 1 row affected (0.00 sec)
But:
Code:
mosuser::store failed<br/>Unknown column 'activation' in 'field list' SQL=INSERT INTO jos_users('id','name','username'.'email','password','usertype','block','gid','registerDate','activation' )VALUES ('0','angela','angela','angela@yahoo.it','36388794be2cf5f298978498ff3c64a2','','1','18','2006-07-22 06:40:42','7de918be9fce9e683d16e5eac0a5ce80')
How do i delete that 'activation'?
I have changed values but 'id' and '0' are still there ...
Please help !!!!
|

23rd July 2006, 22:47
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
Quote:
|
Originally Posted by gabriele
How do i delete that 'activation'?
|
You can either add a column "activation" to the table, or you change the Joomla sources so that you don't need that column.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 13:39.
|
Recent comments
7 hours 51 min ago
14 hours 32 min ago
18 hours 23 min ago
20 hours 1 min ago
1 day 4 hours ago
1 day 13 hours ago
1 day 14 hours ago
1 day 18 hours ago
1 day 22 hours ago
1 day 23 hours ago