douti6740 2014-07-04 04:00
浏览 32

未捕获的异常'com_exception',消息'来源:未知描述:未知'

$("#id_dept").change(function(){

                $.ajax({
                    type: "GET",
                    url: "GetManager.php",
                    data: "department=" + $(this).find(":selected").val(),  
                    dataType: "text",
                    cache: false,
                    success: function(msg){
                    $("#manager").empty();
                    response = $.parseJSON(msg);

                       for (i = 0; i < response.length; i++) {
                    $("#manager").append("<option value='" + response[i] + "'>" + response[i] + "</option>");

                      }
                      $("#manager").trigger('change');
         }}});
                    $("#id_dept").trigger('change');
});


<tr>
                    <td><label for="id_dept"><b>Department</label></td>
                    <td class='centerPad'>:</td>
                    <td>
                    <select for="id_dept" name="id_dept" id="id_dept">
                            <option value=""></option>


                            <?php


                            $SQL = "select distinct department from Managers";

                            $rs = $conn->Execute($SQL);
                            while (!$rs->EOF) {
                            $a = $rs->Fields("Department")->value;
                            echo "<option value='".$a."'>".$a."</option>";


                            $rs->MoveNext();
                            }
                            ?>
                            </select>
                    </td>
                </tr>
                <tr>
                    <td><label for="manager"><b>Approving Manager</label></td>
                    <td class='centerPad'>:</td>
                    <td>
                    <select for="manager" name="managers" id="manager">
                            <option value=""></option>
                            </select>
                    </td>
                </tr>

The code above is in form.php.

[PHP]

$dept = $_GET['department'];

$manager = Array();

// SQL query returns multiple database records.

$query = "SELECT * FROM Managers WHERE Department = '".$dept."'"; 

$rs = $conn->Execute($query);

while (!$rs->EOF) {

$manager[] = $rs->Fields(1)->value;

$rs->MoveNext();

}

echo json_encode($manager);

[PHP]

The code above is Getmanager.php

Now when i try to update my table using the value i have gotten from AJAX.

$strSQL = "Select * from Managers where Names='".$manager."'";
$rs = $conn->Execute($strSQL);

Uncaught exception 'com_exception' with message 'Source: Unknown Description: Unknown'

it seems to be a problem with the datatype. something related to the "meta http-equiv="Content-Type" content="text/html; charset=UTF-8""

Please Help!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 基于卷积神经网络的声纹识别
    • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
    • ¥100 为什么这个恒流源电路不能恒流?
    • ¥15 有偿求跨组件数据流路径图
    • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
    • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
    • ¥15 CSAPPattacklab
    • ¥15 一直显示正在等待HID—ISP
    • ¥15 Python turtle 画图
    • ¥15 stm32开发clion时遇到的编译问题