mirror of
https://gitlab.com/harald.mueller/aktuelle.kurse.git
synced 2024-10-19 09:55:03 +02:00
57 lines
1.4 KiB
PHP
57 lines
1.4 KiB
PHP
|
<?php
|
|||
|
|
|||
|
/*************************************************/
|
|||
|
/** M133 DB Firma connect **/
|
|||
|
/** Author: M. von Orelli **/
|
|||
|
/** Datum: 11.11.2004 **/
|
|||
|
/** Version: 1.0 **/
|
|||
|
/** Applikation:Get Companies Names **/
|
|||
|
/*************************************************/
|
|||
|
|
|||
|
/*************************************************/
|
|||
|
/* Datum <20> Aenderung **/
|
|||
|
/* 11.11.04<EFBFBD> **/
|
|||
|
/* <20> **/
|
|||
|
/* <20> **/
|
|||
|
/* <20> **/
|
|||
|
/* <20> **/
|
|||
|
/*************************************************/
|
|||
|
|
|||
|
|
|||
|
/** Deklaration **/
|
|||
|
Define ("CRLF", "\n<br>");
|
|||
|
|
|||
|
|
|||
|
$server = "DB_Firma";
|
|||
|
$user = "MvO";
|
|||
|
$pass = "vom1";
|
|||
|
$toReturn = "";
|
|||
|
$Query = "Select FirmenName,PLZ,ORT,Bereich from tbl_Firma";
|
|||
|
|
|||
|
echo "Connecting SQL Datenbank: ", $server, CRLF;
|
|||
|
echo "<br>";
|
|||
|
|
|||
|
//connect to database
|
|||
|
$connectionstring = odbc_pconnect($server,$user,$pass);
|
|||
|
|
|||
|
// Query RUN to Get ALL Companies
|
|||
|
echo "Qery Run", CRLF;
|
|||
|
$result = odbc_exec($connectionstring,$Query );
|
|||
|
while(odbc_fetch_row($result))
|
|||
|
{
|
|||
|
for($i=1;$i<=odbc_num_fields($result);$i++)
|
|||
|
{
|
|||
|
$Text = odbc_result($result,$i);
|
|||
|
echo $Text , CRLF;
|
|||
|
}
|
|||
|
echo "<br>";
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
//disconnect from database
|
|||
|
echo "Disconnecting SQL Server:";
|
|||
|
odbc_close($connectionstring);
|
|||
|
|
|||
|
|
|||
|
?>
|