include "db.inc";
/* PARAMETERS READ */
$PAGE = (int)($_REQUEST['page']);
$NUM = (int)($_REQUEST['num']);
$MODE = $_REQUEST['mode'];
$SEARCH_KEY = $_REQUEST['search_key'];
$SEARCH_VAL = $_REQUEST['search_val'];
$CUBRID_HOST = "localhost";
$CUBRID_PORT = 33000;
$CUBRID_DATABASE = "board";
$CUBRID_ID = "dba";
$CUBRID_PASS = "";
$con = db_connect($CUBRID_HOST, $CUBRID_PORT, $CUBRID_DATABASE, $CUBRID_ID, $CUBRID_PASS);
$qry = "select bd_name, bd_title, bd_content, bd_wdate, INCR(bd_cnt) from board where bd_thread > 0 and bd_seqcd = ?";
$req = cubrid_prepare($con, $qry);
$res = cubrid_bind($req, 1, $NUM, "NUMERIC");
$result = cubrid_execute($req);
$row = cubrid_fetch($req);
if ($req > 0) cubrid_close_request($req);
$NAME = $row['bd_name'];
$TITLE = $row['bd_title'];
$CONTENT = $row['bd_content'];
$DATETIME = $row['bd_wdate'];
$COUNT = $row['bd_cnt'] + 1;
?>
CUBRID PHP board sample
CUBRID board sample
include "list_body.php";
?>
db_disconnect($con);
?>