DB 에 테이블을 추가하라는데, 어케 하는지?
1. DB 에 테이블을 추가합니다.
CREATE TABLE IF NOT EXISTS `g4_my_menu` (
`id` int(11) NOT NULL auto_increment,
`mb_id` varchar(20) NOT NULL,
`bo_table` varchar(20) NOT NULL,
PRIMARY KEY (`id`),
KEY `mb_id` (`mb_id`,`bo_table`)
)
위 내용을 이해 못하겠어요. 저거 어떻게 하라는 말인지...
DB에 추가하는 법 좀 알려주세요 !! 어떻게 하면 추가되는지..
CREATE TABLE IF NOT EXISTS `g4_my_menu` (
`id` int(11) NOT NULL auto_increment,
`mb_id` varchar(20) NOT NULL,
`bo_table` varchar(20) NOT NULL,
PRIMARY KEY (`id`),
KEY `mb_id` (`mb_id`,`bo_table`)
)
위 내용을 이해 못하겠어요. 저거 어떻게 하라는 말인지...
DB에 추가하는 법 좀 알려주세요 !! 어떻게 하면 추가되는지..
|
댓글을 작성하시려면 로그인이 필요합니다.
댓글 2개
$dbhost="localhost"; // 본인의 MySQL DB 서버의 위치입니다.
$dbid ="aaaaaa"; // 본인의 계정 아이디를 적으세요.
$dbname="aaaaaa"; // 본인의 MySQL DB 아이디를 적으세요.
$dbpw ="aaaaaa"; // 본인의 DB의 패스워드를 적으세요.
$connect = mysql_connect($dbhost, $dbid,$dbpw) or error(mysql_error());
mysql_select_db($dbname, $connect ) or error(mysql_error());
mysql_query("create table g4_my_menu (
id int(11) not null auto_increment primary key,
mb_id varchar(20) NOT NULL,
bo_table varchar(20) NOT NULL,
index(mb_id),
index(bo_table))
TYPE=MyISAM", $connect);
echo "테이블 생성이 완료되었습니다.";
?>
--------------------------------------------------------------------
줄위에 내용을 test.php 파일에 저장하시고 계정에 올린후 www.aaaaa.co.kr/test.php
*** aaaaa는 모두 본인 계정의 디비,아이디,비번, 주소 입니다.