the apprentice webmaster Posted September 21, 2006 Share Posted September 21, 2006 i have this :[b]INSERT INTO userVALUES ('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]ErrorSQL query: INSERT INTO userVALUES ('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] Quote Link to comment https://forums.phpfreaks.com/topic/21509-help-please-mysql/ Share on other sites More sharing options...
neugi Posted September 21, 2006 Share Posted September 21, 2006 check if the amount of the y & n are correct, seems there is one more or less in your query.best Quote Link to comment https://forums.phpfreaks.com/topic/21509-help-please-mysql/#findComment-95960 Share on other sites More sharing options...
fenway Posted September 21, 2006 Share Posted September 21, 2006 Explicitly specify the column list, and you'll see that they don't match. Quote Link to comment https://forums.phpfreaks.com/topic/21509-help-please-mysql/#findComment-96065 Share on other sites More sharing options...
the apprentice webmaster Posted September 21, 2006 Author Share Posted September 21, 2006 thx guys , but can you be more precise i am new at this ... anyone please help Quote Link to comment https://forums.phpfreaks.com/topic/21509-help-please-mysql/#findComment-96268 Share on other sites More sharing options...
wildteen88 Posted September 22, 2006 Share Posted September 22, 2006 Basically check that you have 31 columns within your user table. And the values in your query match up to those columnsWhat 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. Quote Link to comment https://forums.phpfreaks.com/topic/21509-help-please-mysql/#findComment-96564 Share on other sites More sharing options...
fenway Posted September 22, 2006 Share Posted September 22, 2006 Post the SHOW CREATE TABLE output so that I can see how many columns you're supposed to have. Quote Link to comment https://forums.phpfreaks.com/topic/21509-help-please-mysql/#findComment-96601 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.