please help me

August 17, 2011 at 06:19:27
Specs: Windows 7
i try to add a photo to mysql but a problem has occured:
(Column count doesn't match value count at row 1)

Here is my code:

$ads_photo = $_FILES[ads_photo];
$ads_name = $_FILES[ads_photo][name];
$ads_tmpname = $_FILES[ads_photo][tmp_name];
$ads_size = $_FILES[ads_photo][size];
$ads_type = $_FILES[ads_photo][type];
$ads_error = $_FILES[ads_photo][error];



$query="INSERT into ads (prod_photo) value ($ads_name)";
$result=mysql_query($query) or die(mysql_error()) ;

See More: please help me

Report •

August 22, 2011 at 06:43:07
check your table and your query for having a mismatched number of columns. For example, if your table has (id, text) but your trying to store just text, you'll run into that error.

insert into ads(id, text) values ('', text)


Report •
Related Solutions

Ask Question