Background Image

FORUM

2010.02.03 02:44

오류구문이 뜹니다.

조회 수 8841 추천 수 0 댓글 3
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

function sql_prepare($sql, $params)
{
 global $conn;

 $req = cubrid_prepare( $conn, $sql ); //, CUBRID_INCLUDE_OID );
 $i = 1;
 //echo print_r($params)."<Br>";
 foreach ($params as &$p) {
  $res = cubrid_bind($req, $i, $p);
  $i++;
 }
 return $req;
}

$sql = select * from board a, category b where a.board=b.board and a.id = b.id and a.board= ? and a.id not in ( 249,248,247 ) order by num desc, reply asc for orderby_num() between ? and ?
$params = Array ( "cool", 0, 35 )

$req = sql_prepare($sql, $params);
cubrid_execute($req);
while ($rs = cubrid_fetch($req))  <========= 이줄에서 오류가 납니다.

오류 메세지 :
Warning: Error: DBMS, -447, An operation has been attempted on a closed query result structure. in c:board.php on line 196 Loading...

데이타는 잘 나오는데 무슨오류죠?

  • ?
    seongjoon 2010.02.04 00:31
    $sql = select * from board a, category b where a.board=b.board and a.id = b.id and a.board= ? and a.id not in ( 249,248,247 ) order by num desc, reply asc for orderby_num() between ? and ?
    $params = Array ( "cool", 0, 35 )
    위 내용에서  "나 ', 그리고 ;는 원래 없는 건가요?
    해당 sql 문장에서 사용된 쿼리의 스키마 정보를 올려주시면 문제 해결에 큰 도움이 될 것으로 보입니다.
  • ?
    초보 2010.02.04 00:49
    정확한 쿼리 내용 입니다.
    $sql = "select * board a, category b where a.code=b.code and a.id = b.id and a.code= ? and a.id not in ( 249,248,247 ) order by num desc, reply asc for orderby_num() between ? and ? ";
    $params = Array ( "cool", 0, 35 ) ;
    스키마는 다음과 같습니다.
    CREATE TABLE "board"(
    "id" integer NOT NULL,
    "code" character varying(40) DEFAULT  NOT NULL,
    "num" integer DEFAULT 0 NOT NULL,
    "reply" character varying(20) DEFAULT  NOT NULL,
    );

    CREATE TABLE "category"(
    "ca_id" integer AUTO_INCREMENT PRIMARY KEY,
    "code" character varying(20) DEFAULT  NOT NULL,
    "id" integer DEFAULT 0 NOT NULL,
    "ca_name" character varying(510) DEFAULT  NOT NULL
    );

  • ?
    남재우 2010.02.11 01:44
    안녕하세요.
    해당 내용에 대한 답변은 재질문하신 곳에 답변을 달아드렸습니다. 간단히 말씀드리면 select 질의에 from 이 없어 질의 prepare시 에러가 발생한 내용입니다.
    532번글 답변이 아직 없으셔서 다시 올립니다

List of Articles
번호 제목 글쓴이 날짜 조회 수
공지 CUBRID 사용자를 위한 DBeaver 도구 출시 안내 admin 2024.04.23 71
공지 SQLGate for CUBRID 영구 무료 라이선스 제공 file admin 2020.04.09 4466
1119 [java] 두개의 PreparedStatement 할당후 close 시 문제 2 cuins 2011.07.27 10828
1118 [emerg] 629#0 큐브리드 서비스 시작안됨 3 secret chocob 2014.10.13 7
1117 [cubrid backup or restore] 질문 사항 1 완이예염 2013.06.14 10843
1116 [cubrid 9.3] database에 설정된 timezone을 얻어오는법 질문입니다. 2 smoh 2020.05.11 146
1115 [PHP]CUBRID 연결 문제 6 php_user2 2016.01.29 6901
1114 [HA구성] master 서버 DOWN의 경우 4 큐스코 2015.12.02 6244
1113 [Cubrid HA] restoreslave 사용할 경우 Master/Slave 경로를 반드시 동일하게 맞춰야하나요? 1 큐브짱 2022.05.06 71
1112 [Cubrid 9.3] POSIX ERROR 문의 1 vasconcelos 2018.09.06 360
1111 [CUBRID Migration Toolkit 11.0-i386] 압축 해제 후 오류 1 jeinhe 2022.09.07 73
1110 [CUBRID Admin] 테이블 컬럼 순서 변경 불가 12 tree1891 2023.11.05 179
1109 [CUBRID Admin] 사용자의 테이블 권한 편집 1 tree1891 2023.11.06 98
1108 [CUBRID Admin] ENUM 데이터 내보내기 1 tree1891 2023.11.14 111
1107 [ADO.NET] Syntax error: unexpected 6 tree1891 2023.10.17 152
1106 [-830]Cannot allocate query entry any more. Maximun allocatable entries are 100 1 dasomoh 2021.01.07 225
1105 Your transaction (index 4, dba@LoveME|3952) has been unilaterally aborted by the system.큐브리드 로그파일도 같이 넣었어요.. 1 지니 2009.09.08 28016
1104 XE를 mysql에서 cubrid로 이전한 후 속도가 너무 느립니다. 22 엔하늘 2011.08.07 28568
1103 XE 이전에 관해... 15 sugarkane 2010.11.24 10616
1102 XADatasource 사용시 롤백 이슈 1 devcc 2022.03.22 113
1101 Windows10에서 Accessor is invalid 에러가 발생되는데, 확인좀 부탁드립니다. 4 file sec_smd 2018.12.07 425
1100 Windows 에서 사일런트 설치가 가능한가요... 2 거만쟁이 2009.08.12 23359
Board Pagination Prev 1 ... 140 141 142 143 144 145 146 147 148 149 ... 200 Next
/ 200

Contact Cubrid

대표전화 070-4077-2110 / 기술문의 070-4077-2113 / 영업문의 070-4077-2112 / Email. contact_at_cubrid.com
Contact Sales