[thelist] PHP/MySQL Newbie question
NanHarbisonSmith at aol.com
NanHarbisonSmith at aol.com
Tue May 21 10:26:01 CDT 2002
--
[ Picked text/plain from multipart/alternative ]
You are really going to love how since PHP is. Here is the basic group of
steps I use to connect to the database:
<?php
$Host = "localhost"; //most host names are localhost
$User = "yourUserName";
$Password = "yourPassword";
$DBName = "yourDatabaseName";
$TableName = "yourTableName";
$Link = mysql_connect($Host, $User, $Password);
$Query = "Select * from $TableName";
$result = mysql_db_query($DBName, $Query, $Link);
?>
HTH,
Nan
------------original question---------------------------
> Hi. I'm new to PHP, moving from Cold Fusion and Zope. In Cold
> Fusion, to connect to a database, you need to register the database
> with ODBC. This does not seem to be the case with PHP. How
> does PHP see the connection to the MySQL database and
> associated tables?
>
> In Dreamweaver MX, I seem to make a connection to the MySQL
> server, but no databases or tables show up.
>
Nan Harbison Smith
481 Elm Street
Concord, MA 01742
978-369-1224
978-369-1681
Give a man a fish and you feed him for a day; teach him
to use the Internet and he won't bother you for weeks.
More information about the thelist
mailing list