For Update Database:
$write = Mage::getSingleton('core/resource')->getConnection('core_write');
$write->query("insert into rk_stories values (NULL,'$rks_title', '$rks_date', '$rks_description', '$rks_story', '$rks_theme', '$rks_imgURL', '$rks_img_size', '$rks_isFront')");
$message = $this->__('Your form has been submitted successfully.');
For select Database info :
$result= Mage::getSingleton('core/resource') ->getConnection('core_read')->fetchAll($query);
$Stories["Data"]["ID"]=$result[0]["rk_stories_id"];
$Stories["Data"]["Title"]=$result[(0)]["rk_stories_title"];
$Stories["Data"]["story"]=$result[0]["rk_stories_story"];
return $Stories;
Comments
Post a Comment