Jump to content

help!! please mysql...


the apprentice webmaster

Recommended Posts

i have this :

[b]INSERT INTO user
VALUES (

'localhost', 'toto', 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'
);[/b]
looks fine to me but when i ran it i got this error :

[b]Error
SQL query:

INSERT INTO user
VALUES (

'localhost', 'toto', 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'
);



MySQL said: 

#1136 - Column count doesn't match value count at row 1 [/b]
Link to comment
Share on other sites

Basically check that you have 31 columns within your user table. And the values in your query match up to those columns

What I think fenway meant was to lists you columns in your query: eg:
[code]INSERT INTO user (col1, col2, col3, .. etc .. ) Values ('localhost', 'toto', .. etc ..)[/code]
Obvioulsy you'll want to change where it says colx - x being a number - to the actuall column name you have in your database.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.