오류구문이 뜹니다.

by 초보 posted Feb 03, 2010

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...

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