#1  
Old 19th July 2006, 03:01
gabriele gabriele is offline
Junior Member
 
Join Date: Feb 2006
Location: Napoli
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation 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 03:08.
Reply With Quote
Sponsored Links
  #2  
Old 20th July 2006, 13:26
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

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.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 20th July 2006, 14:05
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,149
Thanks: 4
Thanked 56 Times in 52 Posts
Default

Why not just reinstalling joomla in a different db or with a different prefix and look at the differences?
Reply With Quote
  #4  
Old 20th July 2006, 18:38
gabriele gabriele is offline
Junior Member
 
Join Date: Feb 2006
Location: Napoli
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 18:42.
Reply With Quote
  #5  
Old 20th July 2006, 19:48
gabriele gabriele is offline
Junior Member
 
Join Date: Feb 2006
Location: Napoli
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 19:57.
Reply With Quote
  #6  
Old 21st July 2006, 14:19
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

I don't know Joomla, so I guess you have to review the sources to see where you can change what...
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 22nd July 2006, 07:55
gabriele gabriele is offline
Junior Member
 
Join Date: Feb 2006
Location: Napoli
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 !!!!
Reply With Quote
  #8  
Old 23rd July 2006, 23:47
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
 
Default

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.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR: The PHP binary coming with ISPConfig does not work properly on your system! qvindesland Installation/Configuration 22 21st May 2007 17:05
how to make php to work with mysql (php installed with apt-get, (no mysql support) grafik Installation/Configuration 3 16th May 2006 00:18
Mandriva 10.2 Perfect Setup Install Problems... ctroyp Installation/Configuration 12 30th December 2005 17:04
Problem installing ISPConfig, then with MySQL... ctroyp Installation/Configuration 7 26th September 2005 17:37
MySQL issue during install of ISPConfig ricbax Installation/Configuration 4 16th September 2005 10:41


All times are GMT +2. The time now is 11:22.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.