Sintak dasar koneksi PHP ke MySQL
int mysql_connect(string [hostname [:port] [: /path /to/socket] ], string [username], string [password]);
contoh :
$sql = mysql_connect("localhost", "root", "");
Sintak memilih database
int mysql_select_db(string database_name, int [link_identifier]);
contoh :
$sql = mysql_select_db("database");
klik disini untuk baca selengkapnya
0 komentar:
Post a Comment