Jump to content

saving pictures/photo's on the server??


andy_b_1502

Recommended Posts

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.

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.

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.