Aaah, cannot let it go like that.....let me simplify further... Cut and paste this stuff into notepad (or equiv.), then remove the comments so that you just see the code....see how it goes.. Find a good ref at: http://www.php.net/manual/en/ref.mysql.php
==================================
Make DB Connection
$host = [your mysql server, IP or name]
$user = [your mysql login user]
$pass = [your mysql login password]
If connection fails, the app. will cease.
$ean = mssql_connect($host,$user,$pass)
or die("Failed to Connect to Database");
==================================
Select DB
$ean = [handle assigned from the last line, represents the connection]
'mydatabase' = [the name of the database you intend to query]
If the database is unavaible, the app. will cease.
mssql_select_db('mydatabase',$ean)
or die("Database is Unavailable");
==================================
I assign Queries to a variable first
db = [a table in the mysql database, select an available table from your own database]
$query = "SELECT * FROM db";
==================================
Execute Query and capture the result set into the variable $result
If the query cannot be executed, the app. will cease.
$result = mssql_query($query)
or die("Could Not Perform Select Statement");
==================================
If we got at least a single row returned, let us process it and spit out the results.
$row = [array of the results in both named (associative array) and positional]
\t = When evaluated because of the double quotes, this is a TAB
\n = When evaluated because of the double quotes, this is a Line Break
if(mssql_num_rows($result)){
while($row = mssql_fetch_row($result)){
print "\t<TR>\n";
foreach ($row as $col){
print "\t\t<TD>$col</TD>\n";
}
print "\t</TR>\n";
}
}
==================================
Does this help you a little???
Matthew Pirvul
eAccounts.NETwork