Hello everyone!
I am new to mysql and php. I do have some knowledge of C++, Java, and ASP.
This is the deal:
I bought the oscommerce for professionals to help with a website I need to create. I downloaded and installed the MySql version 5.01. Installations was successful.
command line prompt per book directions.
mysql> use mysql
database changed
mysql> insert into users values(
--> 'localhost',
-->'username',
-->Password('password'),
-->'Y','Y','Y','Y','Y','Y','Y',
-->'N','N','N','N','N','N','N','N','N','N','N',
-->'N','N','N','N','N','N','N','N','N','N');
RETURNS THIS:
ERROR 1136 (21S01): Column count doesn't match value count at row 1
mysql>
I have done some exploring and found out that this means there are more values listed than there are columns in the table.
My question is how do I find out how many columns there are in the table from the command line? This is suppose to an easy exercise just to make sure it works. haha I have been at this for almost 16 hours. I have not even d/l php yet.
Any help would be greatly appreciated!
Thanks in advance,
dink
4 replies to this topic
#1
Posted 06 September 2008 - 03:09 PM
|
|
|
#2
Posted 06 September 2008 - 03:25 PM
run the command
for a column specification for table users
describe users
for a column specification for table users
#3
Posted 06 September 2008 - 11:54 PM
Thanks orjan!
I could not have done this with out your help. The textbook leaves out a lot of vital information for a newbie.
I finally got it to work by inserting field names and then the values for the fields that did not have default values.
INSERT INTO user
(Host,User,Password,ssl_cipher,x509_issuer,x509_subject) VALUES('localhost','myuser','mypassword','null','null','null');
There is no way I could have found this information on my own. It only took me 30 minutes to figure out the code you posted needed a semicolon to work. haha
Again thanks and I really appreciate your help.
Who knows maybe some day I can help some one.:D
dink
I could not have done this with out your help. The textbook leaves out a lot of vital information for a newbie.
I finally got it to work by inserting field names and then the values for the fields that did not have default values.
INSERT INTO user
(Host,User,Password,ssl_cipher,x509_issuer,x509_subject) VALUES('localhost','myuser','mypassword','null','null','null');
There is no way I could have found this information on my own. It only took me 30 minutes to figure out the code you posted needed a semicolon to work. haha
Again thanks and I really appreciate your help.
Who knows maybe some day I can help some one.:D
dink
#5
Posted 29 September 2010 - 08:26 AM
Hey, as you can see I'm new here and not sure if anyone will pick up this thread but i have exactly the same problem with exactly the same book! ive tried what orjan said but to no avail... im sure its going to be something simple... but im literally pulling my hair out! Please Help! heres a quick summary of where im at...
first problem... (Same as original post)
command line prompt per book directions.
mysql> use mysql
database changed
mysql> insert into users values(
--> 'localhost',
-->'username',
-->Password('password'),
-->'Y','Y','Y','Y','Y','Y','Y',
-->'N','N','N','N','N','N','N','N','N','N','N',
-->'N','N','N','N','N','N','N','N','N','N');
RETURNS THIS:
ERROR 1136 (21S01): Column count doesn't match value count at row 1
mysql>
SO I TRIED... The command
describe users;
and just get this...
Table 'mysql.users' doesn't exist
ARRGGH!
Please Help!
first problem... (Same as original post)
command line prompt per book directions.
mysql> use mysql
database changed
mysql> insert into users values(
--> 'localhost',
-->'username',
-->Password('password'),
-->'Y','Y','Y','Y','Y','Y','Y',
-->'N','N','N','N','N','N','N','N','N','N','N',
-->'N','N','N','N','N','N','N','N','N','N');
RETURNS THIS:
ERROR 1136 (21S01): Column count doesn't match value count at row 1
mysql>
SO I TRIED... The command
describe users;
and just get this...
Table 'mysql.users' doesn't exist
ARRGGH!
Please Help!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









