묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
마이sql에서 테이블만들때..
2002.04.08 11:10
제로님의 팁 보고 따라 했는데...
http://nospams.net/phper/mysql.php
처럼.... 안되네요,,
뭐가 문제죠?
<?
$host_name = "localhost";
$user_name = "anitopia";
$user_password = "****";
$db_name = "*****";
$connect = mysql_connect($host_name,$user_name,$user_password) or echo"mysql_error()";
mysql_select_db($db_name, $connect) or echo"mysql_error()";
$que = "CREATE TABLE Human_info (
id int(11) DEFAULT '0' NOT NULL auto_increment,
name varchar(10),
age int(3),
tel_num varchar(20),
address text,
PRIMARY KEY (id))";
mysql_query( $que, $connect ) or echo"mysql_error()";
?>
http://nospams.net/phper/mysql.php
처럼.... 안되네요,,
뭐가 문제죠?
<?
$host_name = "localhost";
$user_name = "anitopia";
$user_password = "****";
$db_name = "*****";
$connect = mysql_connect($host_name,$user_name,$user_password) or echo"mysql_error()";
mysql_select_db($db_name, $connect) or echo"mysql_error()";
$que = "CREATE TABLE Human_info (
id int(11) DEFAULT '0' NOT NULL auto_increment,
name varchar(10),
age int(3),
tel_num varchar(20),
address text,
PRIMARY KEY (id))";
mysql_query( $que, $connect ) or echo"mysql_error()";
?>
댓글 2
-
Legend
2002.04.08 12:51
-
:토깽이 in WorldCup:
2002.04.08 13:27
이걸 고쳐서 알려주세요...무슨 뜻인지 모르겠네요...단어가,
<?
$host_name = "localhost";
$user_name = "anitopia";
$user_password = "****";
$db_name = "*****";
$connect = mysql_connect($host_name,$user_name,$user_password) or echo"mysql_error()";
mysql_select_db($db_name, $connect) or echo"mysql_error()";
$que = "CREATE TABLE Human_info (
id int(11) DEFAULT '0' NOT NULL auto_increment,
name varchar(10),
age int(3),
tel_num varchar(20),
address text,
PRIMARY KEY (id))";
mysql_query( $que, $connect ) or echo"mysql_error()";
?>
or echo"mysql_error()"; --> or 에러함수("에러내용");
function 에러함수($매개변수)
{ echo $매개변수;}