问题。我正在创建一个具有自定义查询而不仅仅是标准表的数据表。我希望能够使用现有的$ username并根据该名称显示记录。我如何更改我的代码,以便能够在会话$ username = instructor1_full_id中显示记录,还是在编辑器中显示?
Editor::inst( $db, ‘dbo.data_record')
->fields(
Field::inst( 'instructor1_full_name' )->validator( 'Validate::notEmpty' ),
Field::inst( 'category' )->validator( 'Validate::notEmpty' ),
Field::inst( 'Metric_text' ),
Field::inst( 'response_value' )->validator( 'Validate::numeric'
, array("values" => "0.0", "0.5", "1.0", "1.5", "2.0", "2.5", "3.0", "3.5", "4.0",
"message" => "Please enter a range 0.0-4.0 with half increments" )),
Field::inst( 'fkey_course_id' ),
Field::inst( 'id' ),
Field::inst( 'first_name' ),
Field::inst( 'last_name' ),
Field::inst( 'fkey_semester_id' ),
Field::inst( 'course_code' ),
Field::inst( 'course_number' ),
Field::inst( 'course_section' )
)
->process( $_POST )
->json();