".chr(13); } //Close the database connection mysql_close($db); /////////////////////////////////////////////// /////////////////////////////////////////////// /////////////////////////////////////////////// /////////////////////////////////////////////// /* $server="localhost"; $username="yourID"; $password="yourPass"; // Open DB connection $sqlconnect = mysql_connect($server, $username, $password); //Select the DB you want to use / work with //You will need to change northwind to yourDB name $sqldb = mysql_select_db("northwind",$sqlconnect); //Create the SQL query $sqlquery = "SELECT DISTINCT companyName FROM Customers;"; //execute the SQL query and store the result of the execution into $result //in some cases, it might be helpful to replace the following line with this line: // mysql_query($sql) or die(mysql_error()); $result = mysql_query($sqlquery); //Loop through the results while($row=mysql_fetch_array($result)) { //echo out the value of the column (field) pulled from the database echo $row['companyName']."
\n"; } //Close the connection to the DB mysql_close($sqlconnect); */ /////////////////////////////////////////////// /////////////////////////////////////////////// ?>