pseny Posted March 29, 2014 Share Posted March 29, 2014 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 More sharing options...
Edward Posted March 30, 2014 Share Posted March 30, 2014 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']; 1 Link to comment Share on other sites More sharing options...
Recommended Posts