scootstah Posted February 11, 2012 Share Posted February 11, 2012 Okay, so you are trying to insert a different amount of columns than you specified in the query. Since you didn't specify any columns in your query, it wants to insert data to all the columns. So you need to modify your query and include the column names for the data you want to insert. INSERT INTO `Companies` (company_name, basicpackage_description, location, postcode, upload) VALUES ('$company_name', '$basicpackage_description', '$location', '$postcode', '$upload') Something like that, only with the actual column names. Quote Link to comment https://forums.phpfreaks.com/topic/256754-saving-picturesphotos-on-the-server/page/2/#findComment-1316990 Share on other sites More sharing options...
andy_b_1502 Posted February 11, 2012 Author Share Posted February 11, 2012 okay thanks Quote Link to comment https://forums.phpfreaks.com/topic/256754-saving-picturesphotos-on-the-server/page/2/#findComment-1316996 Share on other sites More sharing options...
scootstah Posted February 11, 2012 Share Posted February 11, 2012 Look at yours, now look at mine. Now yours, now mine. There's a difference. The INSERT statement can be broken down like this INSERT INTO <TABLE> (<COLUMNS>) VALUES (<COLUMN VALUES>) You can omit the <COLUMNS> but this means it will want to insert into every column. If you don't specify data for every column, you will get an error. If you have 10 columns and you only want to insert into 3 of them, you'll need to explicitly specify those 3 columns. Quote Link to comment https://forums.phpfreaks.com/topic/256754-saving-picturesphotos-on-the-server/page/2/#findComment-1316997 Share on other sites More sharing options...
andy_b_1502 Posted February 12, 2012 Author Share Posted February 12, 2012 right okay.. thanks BUT the problem was the fact that the variables were being put into my table in the wrong order. Quote Link to comment https://forums.phpfreaks.com/topic/256754-saving-picturesphotos-on-the-server/page/2/#findComment-1317185 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.