odbc connectionm problem
Jason Koch <[email protected]>
| Newsgroups | gmane.comp.db.mysql.odbc |
|---|---|
| Message-ID | <[email protected]> |
I have mysql from godaddy.com. I have installed odbc 3.51.12 but cannot connect.
Here are my Connector/ODBC settings:
Date Source Name: shelby72
Server: mysql139.secureserver.net
Below is the sample configuration from godaddy.com if I was connecting to MySQL Database using PHP.
MySQL Server Database Connection Settings
Description:
This example describes using PHP to connect to a MySQL Database on a Linux hosting account.
<?php
//Connect To Database
$hostname="mysql139.secureserver.net";
$username="shelby72";
$password="your_password";
$dbname="shelby72";
$usertable="your_tablename";
$yourfield = "your_field";
mysql_connect($hostname,$username, $password) OR DIE ("Unable to connect to database! Please try again later.");
mysql_select_db($dbname);
$query = "SELECT * FROM $usertable";
$result = mysql_query($query);
if($result) {
while($row = mysql_fetch_array($result)){
$name = $row["$yourfield"];
echo "Name: ".$name;
}
}
?>
____________________________________________________________________________________
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list&sid=396546091