这种比较长的SQL语句你可以分开写,
$column = (col1,col2,...);
$val = ($val1,$val2,val3,...);
然后分别print一下看看是否有错误,没有错误时执行
$sql = INSERT INTO $column VALUES $val;
$result=mysql_query($sql); 

解决方案 »

  1.   

    $sql="INSERT INTO ecs_goods (cat_id,goods_sn,goods_name,goods_name_style,click_count,brand_id,goods_number,goods_weight,et_price,shop_price,promote_price,promote_start_date,promote_end_date,warn_number,goods_desc,goods_thumb,goods_img,original_img,is_real,is_on_sale,is_alone_sale,integral,add_time,sort_order,is_delete,is_best,is_new,is_hot,is_promote,bonus_type_id,last_update,goods_type,give_integral) VALUES("$_REQUEST[cat_id]","$_REQUEST[goods_sn]","$_REQUEST[goods_name]",'+'...把单引号去掉看看
      

  2.   

    改成这样试试:
    $sql="INSERT INTO ecs_goods (cat_id,goods_sn,goods_name,goods_name_style,click_count,brand_id,goods_number,goods_weight,et_price,shop_price,promote_price,promote_start_date,promote_end_date,warn_number,goods_desc,goods_thumb,goods_img,original_img,is_real,is_on_sale,is_alone_sale,integral,add_time,sort_order,is_delete,is_best,is_new,is_hot,is_promote,bonus_type_id,last_update,goods_type,give_integral) 
    VALUES(".$_REQUEST['cat_id'].",'".$_REQUEST['goods_sn']."','".$_REQUEST['goods_name']."','+',".$_REQUEST['click_count'].",".$_REQUEST['brand_id'].",1,0,".$_REQUEST['et_price'].",".$_REQUEST['shop_price'].",0,0,0,1,'".$_REQUEST['goods_desc']."','".$_REQUEST['goods_thumb']."','".$_REQUEST['goods_img']."','".$_REQUEST['original_img']."',1,1,1,0,".$_REQUEST['add_time'].",0,0,0,0,0,0,0,".$_REQUEST['last_update'].",0,-1)";