小编Bee*_*bie的帖子

PHP如何修复注意:未定义的变量:

码:

Function ShowDataPatient($idURL)
{
    $query =" select * from cmu_list_insurance,cmu_home,cmu_patient where cmu_home.home_id = (select home_id from cmu_patient where patient_hn like '%$idURL%')
                     AND cmu_patient.patient_hn like '%$idURL%'
                     AND cmu_list_insurance.patient_id like (select patient_id from cmu_patient where patient_hn like '%$idURL%') ";

    $result = pg_query($query) or die('Query failed: ' . pg_last_error());

    while ($row = pg_fetch_array($result))
    {
        $hn = $row["patient_hn"];
        $pid = $row["patient_id"];
        $datereg = $row["patient_date_register"];
        $prefix = $row["patient_prefix"];
        $fname = $row["patient_fname"];
        $lname = $row["patient_lname"];
        $age = $row["patient_age"];
        $sex = $row["patient_sex"];
    }          
    return array($hn,$pid,$datereg,$prefix,$fname,$lname,$age,$sex);
}
Run Code Online (Sandbox Code Playgroud)

错误: …

php undefined notice

3
推荐指数
3
解决办法
12万
查看次数

标签 统计

notice ×1

php ×1

undefined ×1