현 상황
$sno=$_POST['sno'];
$query="select e.sno,e.grade,e.cno,c.cname,c.credit,c.dept,c.prname
from enrol e,course c
where exists(select c1.cno from course c1 where e.sno=$sno and e.cno=c1.cno)
and c.cno=e.cno";
$stmt=oci_parse($conn,$query);
질문 : oci_define 함수를 써도 CNO의 값을 $cno가 받을수가없습니다. 이유와 해결방법 부탁드립니다.
해본것
oci_define_by_name($stmt,'CNO'.$cno);oci_define_by_name($stmt,'E.CNO'.$cno);
oci_define_by_name($stmt,'ENROL.CNO'.$cno);
안됩니다.
첨부파일 1은 소스
첨부파일 2는 페이지입니다.
Comment 1
-
짱나부러
2015.05.13 21:41
참고 자료는.....
http://php.net/manual/kr/function.oci-define-by-name.php
oci_execute 후 oci_fetch 하신건지... 코드가 끝까지 안보이네요.......
쿼리 또 한 정상적으로 request가 된건지 sql server profiler 로 batch completed 잡아보시구요.....오라클 이시군요... 오라클은 쿼리가 정상적으로 request 됐는지 확인 하는 방법이 없나요;;; 잘 몰라서 ㅠ
그리구.... 쿼리 내용이 중복이 있어보이는데..
select e.sno,e.grade,e.cno,c.cname,c.credit,c.dept,c.prname
from enrol e,course c
where e.sno = $sno
and c.cno=e.cno
이렇게 써두 될거 같은데요...;;