未定义的偏移量:在Yii Controller中使用子查询后为0

时间:2014-04-17 04:01:21

标签: php yii

我在Controller中使用子查询后遇到问题? 这是我的子查询:

"select "
. " dat_mahasiswa.nim_mhs, dat_semester.ket_smt, case left(dat_mahasiswa.kd_kls,1) 
when '0' then mid(dat_mahasiswa.kd_kls,2,1) else mid(dat_mahasiswa.kd_kls,1,2) 
end semt, nama_mhs, no_uts, tab_shift.ket_shift, dat_mahasiswa.kd_kls, 
id_krs, dat_krs.kd_kls krs_kls, id_jdw, tgl_uts tgl_ujian, wkt_uts wkt_ujian,
concat(case DAYNAME(dat_jadwal_kuliah.tgl_uts) when 'Sunday' then 'MINGGU' 
else case DAYNAME(dat_jadwal_kuliah.tgl_uts) when 'Monday' then 'SENIN' 
else case DAYNAME(dat_jadwal_kuliah.tgl_uts) when 'Tuesday' then 'SELASA' 
else case DAYNAME(dat_jadwal_kuliah.tgl_uts) when 'Wednesday' then 'RABU' 
else case DAYNAME(dat_jadwal_kuliah.tgl_uts) when 'Thursday' then 'KAMIS' 
else case DAYNAME(dat_jadwal_kuliah.tgl_uts) when 'Friday' then 'JUM''AT' 
else 'SABTU' end end end end end end,', ',
DATE_FORMAT(dat_jadwal_kuliah.tgl_uts, '%d %M %Y')) 'HARI/TANGGAL', 
dat_jadwal_kuliah.wkt_uts 'WAKTU', dat_jadwal_kuliah.kd_ruang_uts 'RUANG', 
dat_jadwal_kuliah.kd_kls 'KELAS', tab_mata_kuliah.nama_mt_klh 
'NAMA MATA KULIAH', '' as PARAF, no_uts From dat_mahasiswa 

INNER JOIN dat_krs ON dat_mahasiswa.nim_mhs = dat_krs.nim_mhs 
INNER JOIN dat_jadwal_kuliah ON (dat_krs.kd_kls = dat_jadwal_kuliah.kd_kls 
and dat_krs.kd_smt=dat_jadwal_kuliah.kd_smt) 
INNER JOIN tab_shift ON dat_mahasiswa.kd_shift = tab_shift.kd_shift 
INNER JOIN dat_semester ON dat_krs.kd_smt=dat_semester.kd_smt 
INNER JOIN tab_mata_kuliah ON dat_krs.kd_mt_klh = tab_mata_kuliah.kd_mt_klh 
INNER JOIN tab_program_studi ON dat_krs.kd_pst = tab_program_studi.kd_pst 
INNER JOIN dat_dosen dosen1 ON tab_program_studi.ketua_pst = dosen1.ni_dos 
INNER JOIN dat_panitia_ujian ON dat_panitia_ujian.kd_smt = dat_jadwal_kuliah.kd_smt
INNER JOIN dat_no_ujian ON (dat_krs.nim_mhs = dat_no_ujian.nim_mhs 
and dat_krs.kd_smt = dat_no_ujian.kd_smt) 
INNER JOIN (select nim_mhs from keu_tagihan where id_jns_tghn=3 
             and jml_bayar>=(jml_tghn/2) 
             and kd_smt='$_smt' 
             and nim_mhs='$_nim'
) tagihansks on dat_mahasiswa.nim_mhs=tagihansks.nim_mhs 
INNER JOIN (select nim_mhs from keu_tagihan where id_jns_tghn=5 
             and jml_bayar>=jml_tghn 
             and kd_smt='$_smt' 
             and nim_mhs='$_nim'
) tagihanuts on dat_mahasiswa.nim_mhs=tagihanuts.nim_mhs 

where dat_mahasiswa.kd_shift <> 'E' and dat_mahasiswa.nim_mhs='$_nim' 
and tab_mata_kuliah.mt_ujian='Y' and dat_krs.kd_smt='$_smt' 
AND dat_jadwal_kuliah.kd_mt_klh = dat_krs.kd_mt_klh 
and dat_jadwal_kuliah.kd_pst=tab_mata_kuliah.kd_pst ;";

并且我有这样的错误

错误500

未定义的偏移量:0


之前感谢。

1 个答案:

答案 0 :(得分:0)

工作,谢谢大家,问题就在Yii上的../Project/index.php上 我忘记打开这样的命令行:

//在生产模式下删除以下行 // defined('YII_DEBUG')或define('YII_DEBUG',true);

//指定每条日志消息中应显示多少级别的调用堆栈 定义('YII_TRACE_LEVEL')或定义('YII_TRACE_LEVEL',3);

所以在我打开这样的命令行之后:

//在生产模式下删除以下行 defined('YII_DEBUG')或define('YII_DEBUG',true);

//指定每条日志消息中应显示多少级别的调用堆栈 定义('YII_TRACE_LEVEL')或定义('YII_TRACE_LEVEL',3);

我再没有任何错误。

谢谢你们所有人