Jump to content
Larry Ullman's Book Forums

How Do I Use $_Post In Yii


pseny
 Share

Recommended Posts

i have to tables that are link and i want to view contents of a single item when i select it, what is the correct syntax of using $post in yii

ie SELECT tbl_emp.emp_id, tbl_emp.sname, tbl_fname, tbl_educ.empl_id FROM tbl_emp, tbl_edu WHERE tbl_emp.emp_id=$_POST['emp_id'] AND tbl_edc.emp_id=$_PSOT['emp_id'];

Link to comment
Share on other sites

I would work directly with the Relational Active Record its there to make the job easier especially if you are using the framework. You want to check out this section in the Yii reference guide.

 

http://www.yiiframework.com/doc/guide/1.1/en/database.arr

 

Or if you want to extract model attributes from $_POST you would do something like

 

$model->attributes=$_POST['Item'];
  • Upvote 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...