David
2003-09-22, 03:02 PM
Connection Strings
Perl $dbh = DBI->connect("DBI:mysql:david_nuke:localhost","david_lai","<PASSWORD HERE>");
PHP $dbh=mysql_connect ("localhost", "david_lai", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("david_nuke");
JDBC (may not be available) <%@ page import="java.sql.*" %>
Connection connection = null;
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
connection = DriverManager.getConnection(
"jdbc:mysql://localhost/david_nuke?user=david_lai&password=<PASSWORD HERE>");
對不對?
:roll: Thanks.
Perl $dbh = DBI->connect("DBI:mysql:david_nuke:localhost","david_lai","<PASSWORD HERE>");
PHP $dbh=mysql_connect ("localhost", "david_lai", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("david_nuke");
JDBC (may not be available) <%@ page import="java.sql.*" %>
Connection connection = null;
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
connection = DriverManager.getConnection(
"jdbc:mysql://localhost/david_nuke?user=david_lai&password=<PASSWORD HERE>");
對不對?
:roll: Thanks.