我创建了一个功能,只需点击按钮查看即可查看该项目的详细信息,该模式将显示其数据。到目前为止,我有一个jQuery代码:
select * from tableA where id in (1,2)
union
select * from tableB where id in (1,4)
minus
select a,id, a.Name from tableA a join tableB b on a.id = b.id where
a.id in (1,2);
和我的PHP代码:
function ViewDetails(rr_number) {
$('#hidden_rr_number').val(rr_number);
$.post(base_url('ajax/ajaxViewRR.php'), {
rr_number:rr_number
},
function(data, status) {
var details = JSON.parse(data);
$('#edit_selected_supplier').val(details.supplier_name);
$('#edit_selected_po').val(details.po_number);
$('#edit_selected_category').val(details.category_name);
$('#edit_rr_number').val(details.rr_number);
$('#edit_rr_receipt_number').val(details.receipt_number);
$('#edit_date_received').val(details.date_received);
// Open modal popup
$(".modal_edit_rr").modal("show");
}
);
}
到目前为止,我得到了我想要的输出,但数据只显示在文本框中,并且不会显示选项选项。我该怎么办?