Yii Framework Forum: Insert Data Jadi Double Record - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Insert Data Jadi Double Record Rate Topic: -----

#1 User is offline   bradercep 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 07-July 11

Posted 28 February 2013 - 08:16 AM

Permisi master-master, saya sedang belajar Yii untuk insert data, database yang saya gunakan adalah PostgreSQL, data sudah berhasil masuk tapi kok setiap insert data ke tabel, yang masuk 2 record. itu kenapa ya? mohon bantuannya ya.

tabel saya id, nama, alamat
yang id nya itu serial (auto increment).
apa berpengaruh karena itu ya?
0

#2 User is offline   54byte 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 40
  • Joined: 06-November 10

Posted 02 March 2013 - 07:23 AM

biasa nya kasus gini terjadi karena agan jalanin validasi yang ajax nya. Saya dulu pernah gitu soalnya..
0

#3 User is offline   bradercep 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 07-July 11

Posted 03 March 2013 - 09:31 PM

thanx for reply gan,

iya saya post formnya pakai ajax, trus cara validasinya gimana ya mohon pencerahannya gan
0

#4 User is offline   C.S.Putera 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 92
  • Joined: 18-May 11

Posted 04 March 2013 - 10:55 AM

Hellow, setelah validasi apakah agan udah "suruh" si Yii nya stop pakai "Yii::app()->end()" ?

Quote

protected function performAjaxValidation($model)
{
if(isset($_POST['ajax']) && $_POST['ajax']==='product-request-form')
{
echo CActiveForm::validate($model);
Yii::app()->end();
}
}

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users