mirror of
https://gitlab.com/harald.mueller/aktuelle.kurse.git
synced 2024-10-19 09:55:03 +02:00
56 lines
1.3 KiB
PHP
56 lines
1.3 KiB
PHP
<?php
|
|
|
|
/*************************************************/
|
|
/** M133 DB Firma connect **/
|
|
/** Author: M. von Orelli **/
|
|
/** Datum: 11.11.2004 **/
|
|
/** Version: 1.0 **/
|
|
/** Applikation:Get Companies Names **/
|
|
/*************************************************/
|
|
|
|
/*************************************************/
|
|
/* Datum ¦ Aenderung **/
|
|
/* 11.11.04¦ **/
|
|
/* ¦ **/
|
|
/* ¦ **/
|
|
/* ¦ **/
|
|
/* ¦ **/
|
|
/*************************************************/
|
|
|
|
|
|
|
|
|
|
/** Deklaration **/
|
|
Define ("CRLF", "\n<br>");
|
|
|
|
|
|
$server = "DB_Firma";
|
|
$user = "MvO";
|
|
$pass = "vom1";
|
|
$toReturn = "";
|
|
$Query = "EXEC sps_InsertFirma 'Siemens AG',8712,'Rapperswil','Feuer & Einbruch'";
|
|
|
|
|
|
echo "Connecting SQL Datenbank: ", $server, CRLF;
|
|
echo "<br>";
|
|
|
|
//connect to database
|
|
$connectionstring = odbc_pconnect($server,$user,$pass);
|
|
echo $connectionstring , CRLF;
|
|
|
|
// Query RUN to Get ALL Companies
|
|
echo "Qery Run", CRLF;
|
|
echo $Query , CRLF;
|
|
$result = odbc_exec($connectionstring,$Query );
|
|
|
|
|
|
echo $result ," => Result of Query Run" ,CRLF;
|
|
|
|
|
|
//disconnect from database
|
|
echo "Disconnecting SQL Server:";
|
|
odbc_close($connectionstring);
|
|
|
|
|
|
?>
|