데이터베이스/SQL
[MySQL API] mysql_select_db()
광박이
2011. 3. 3. 14:24
728x90
MySQL에서 사용할 데이터베이스를 선택
【예제】
<html><body>
< ?
$db=mysql_connect("localhost","root","root_password")
or die("DB connection Failed ....");
$res= mysql_select_db("mydb",$db);
echo $res;
? >
</body></html>
【예제】
<html><body>
< ?
$db=mysql_connect("localhost","root","root_password")
or die("DB connection Failed ....");
$res= mysql_select_db("mydb",$db);
echo $res;
? >
</body></html>
728x90