홈페이지 : [HOMEPAGE] 페이지 스크립트 : [Y_SCRIPTS] 데이터베이스 관리 : [PHPMYADMIN]

TEST FUNCTION : [ADD_TRANSACTION] [LIST_TRANSACTIONS]

HTML FORM CODE 관리 : fair_contents
수정 입력
<div class='basic_form_div'>
<form name='basic_form' method='post' action='' target='data_exec_frame'>
<input type='text' class='basic_input_class' name='no' value='$no'>
<input type='text' class='basic_input_class' name='code' value='$code'>
<input type='text' class='basic_input_class' name='m_no' value='$m_no'>
<input type='text' class='basic_input_class' name='category' value='$category'>
<input type='text' class='basic_input_class' name='title' value='$title'>
<input type='text' class='basic_input_class' name='subtitle' value='$subtitle'>
<textarea class='basic_textarea_class' name='body'>$body</textarea>
<input type='text' class='basic_input_class' name='tags' value='$tags'>
<input type='text' class='basic_input_class' name='brief' value='$brief'>
<input type='text' class='basic_input_class' name='saved' value='$saved'>
<input type='text' class='basic_input_class' name='hits' value='$hits'>
<input type='text' class='basic_input_class' name='likes' value='$likes'>
<input type='text' class='basic_input_class' name='marks' value='$marks'>
</form>
</div>
생성된 테이블 목록 : BLANK
BOARD
books
fair_articles
fair_articles_like
fair_articles_replies
fair_category
fair_contacts
fair_contacts_chat
fair_contents
fair_members
fair_members_mailing

$no=$_POST['no'];
$code=$_POST['code'];
$m_no=$_POST['m_no'];
$category=$_POST['category'];
$title=$_POST['title'];
$subtitle=$_POST['subtitle'];
$body=$_POST['body'];
$tags=$_POST['tags'];
$brief=$_POST['brief'];
$saved=$_POST['saved'];
$hits=$_POST['hits'];
$likes=$_POST['likes'];
$marks=$_POST['marks'];
인서트문(INSERT/CREATE)
$insert_query="insert into `fair_contents`( `no`, `code`, `m_no`, `category`, `title`, `subtitle`, `body`, `tags`, `brief`, `saved`, `hits`, `likes`, `marks`) values( '$no', '$code', '$m_no', '$category', '$title', '$subtitle', '$body', '$tags', '$brief', '$saved', '$hits', '$likes', '$marks')";
mysqli_query($connect,$insert_query);
업데이트문(UPDATE/MODIFY)
$update_query="update `fair_contents` set `code`='$code', `m_no`='$m_no', `category`='$category', `title`='$title', `subtitle`='$subtitle', `body`='$body', `tags`='$tags', `brief`='$brief', `saved`=now(), `hits`='$hits', `likes`='$likes', `marks`='$marks' where `no` like '$no'";
mysqli_query($connect,$update_query);
셀렉트문(READ/VIEW) : Multi-values
$records_query="select * from `fair_contents` where `NO` like '$no'";
$records_result=mysqli_query($connect,$records_query);
$records_num=mysqli_affected_rows($connect);
for($i=0;$i<$records_num;$i++) {
$record_row=mysqli_fetch_array($records_result);
//your code for table record value
}
셀렉트문(READ/VIEW) : Specific-value
$record_query="select * from `fair_contents` where `NO` like '$no'";
$record_result=mysqli_query($connect,$record_query);
$record_row=mysqli_fetch_array($record_result);
//your code for table record value
델리트문(DELETE/ERASE)
$delete_query="delete from `fair_contents` where `NO` like '$no'";
mysqli_query($connect,$delete_query);