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
https://forums.phpfreaks.com/topic/21509-help-please-mysql/
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
https://forums.phpfreaks.com/topic/21509-help-please-mysql/#findComment-96564
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.