hi,
I am new to cakephp I am Currently working on project where i have to edit
user details.For that i have one table named Prjdetails where no id column
is there i have one user_id Column that contain value of user id.Now When i
try read command to read the details related to particular user id it
generates error that prjdetails.id field not found.I also try to modify read
command by putting condition that search result by userid but wont work
please suggest me any way to resolve this i want when user click on edit
details button a form with populated data should open up.
if(empty($this->data)){
$this->data=$this->Prjdetail->read(Null,'user_id');
$this->set(' ,$this->data)
}
else
{
$this->Post->save($this->data);
$this->Session->setFlash('The Post has been Updated');
$this->redirect(array('action'=>'view',$id));
}
}
this is the code for edit function in controller
--
View this message in context:
http://cakephp.1045679.n5.nabble.com/edit-database-record-tp5697178.html
Sent from the CakePHP mailing list archive at Nabble.com.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php