This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Unable to save data in db

Discussion relating to version 1.2.x stable

Unable to save data in db

by vany » Tue Jun 21, 2011 8:46 am

Please look at the code i have used to store the data in db. Anything wrong? I'm new to Symfony.

I'm getting this error: "Oops! An Error Occurred. The server returned a 500 Internal Server Error".

Please help me out.. Thanks.

public function executeAddrfisbmt(sfWebRequest $request)
{
$rfi_info = new RfiInfo();
$rfi_info->setRfiDesc('Test Desc');
$rfi_info->save();
$rfi_info->redirect('rfi/addrfi');
}
vany
Junior Member
 
Posts: 2
Joined: Tue Jun 21, 2011 8:39 am

Re: Unable to save data in db

by touch_the_sky » Wed Jun 22, 2011 1:13 pm

Run it in a _dev mode, by default you should get a detailed error message which would allow you to fix the problem.
User avatar
touch_the_sky
Member
 
Posts: 96
Joined: Tue Jun 16, 2009 4:13 pm

Re: Unable to save data in db

by vany » Sat Jun 25, 2011 9:11 am

Thanks. Its becoz of foreign key constraint. Fixed :)
vany
Junior Member
 
Posts: 2
Joined: Tue Jun 21, 2011 8:39 am