$sql="INSERT INTO tb_traders(trader_id,name_compa,compa_trader,leader,amphoe,tambon,address,telephone,fax,'".$reg_year."') VALUES('$maxreg','$reg_namecompa','$reg_typecompa','$reg_leader','$reg_amphoe','$reg_tambon','$reg_address','$reg_tel','$reg_fax','$reg_idcompa')";
$sql="INSERT INTO tb_traders(trader_id,name_compa,compa_trader,leader,amphoe,tambon,address,telephone,fax,'".$reg_year."') VALUES('$maxreg','$reg_namecompa','$reg_typecompa','$reg_leader','$reg_amphoe','$reg_tambon','$reg_address','$reg_tel','$reg_fax','$reg_idcompa')";
Code (PHP)
$sql="INSERT INTO tb_traders(trader_id,name_compa,compa_trader,leader,amphoe,tambon,address,telephone,fax,$reg_year) VALUES('$maxreg','$reg_namecompa','$reg_typecompa','$reg_leader','$reg_amphoe','$reg_tambon','$reg_address','$reg_tel','$reg_fax','$reg_idcompa')";
Code (PHP)
$sql="INSERT INTO tb_traders(trader_id,name_compa,compa_trader,leader,amphoe,tambon,address,telephone,fax,".$reg_year.") VALUES('$maxreg','$reg_namecompa','$reg_typecompa','$reg_leader','$reg_amphoe','$reg_tambon','$reg_address','$reg_tel','$reg_fax','$reg_idcompa')";
INSERT INTO tb_traders(trader_id,name_compa,compa_trader,leader,amphoe,tambon,address,telephone,fax,2552) VALUES('1','ดอกไม้ประดิษฐ์จากกระดาษสา','1','นางแสงเทียน ธรรมลังกา','5201','520112','191','054358813','','0009')
$sql="INSERT INTO tb_traders(trader_id,name_compa,compa_trader,leader,amphoe,tambon,address,telephone,fax,`".$reg_year."`) VALUES('$maxreg','$reg_namecompa','$reg_typecompa','$reg_leader','$reg_amphoe','$reg_tambon','$reg_address','$reg_tel','$reg_fax','$reg_idcompa')";