aktuelle.kurse/m133/4_Modulinhalte_und_Uebungen/00-Anwendungen-Beispiele-Uebungen/Datenbank/DB_Firma_Insert_Companies.php
Harald G. Mueller 28ff49e098 muh
2023-06-29 07:50:41 +02:00

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);
?>