Hi i write valid queries for data insertion but not successeded.If i print that query and excute it on sql server it works.I didn't figure out why this not works. This is my table structure.
CREATE TABLE `findyoursizevalues` (
`findyoursize_id` int(11) DEFAULT NULL,
`key_val` varchar(200) DEFAULT NULL,
`min_values` int(10) DEFAULT NULL,
`max_values` int(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1.
This is different queries i use for insertion but no output.
$connectionWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
$tableName = $connectionWrite->getTableName('findyoursizevalues');
$connectionWrite->beginTransaction();
$data = array();
$data['findyoursize_id']= $fid;
$data['key_val']=$key;
$data['min_values']=$min_val;
$data['max_values']=$max_val;
$connectionWrite->query("insert into ".$tableName." values ('1','bbb','2','3')"); //query 1
$connectionWrite->query(" insert into $tableName set findyoursize_id =$fid,key_val='".$key."',min_values=$min_val,
max_values=$max_val ");// query 2
$connectionWrite->insert($tableName, $data); // query 3
$connectionWrite->commit();