User Tools

Site Tools


kurs:php12_1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

kurs:php12_1 [2014/09/10 21:22] (current)
Line 1: Line 1:
 +====== Tabellen erstellen ====== 
 +<code php> 
 +<?php 
 +$db = ocilogon("​scott","​tiger"​);​ 
 +// SQL code zum Anlegen der Tabelle PIZZA 
 +$tab_pizza ​     = "​create table PIZZA ( 
 +                   P_NR number(7) Not Null,  
 +                   ​P_NAME varchar2(30),​  
 +                   ​P_PREIS number(4,​2),​  
 +                   ​primary key(P_NR) 
 +                   )  
 +                   ​tablespace Users";​ 
 +// SQL code zum Anlegen der Tabelle BESTELLUNG 
 +$tab_bestellung = "​create table BESTELLUNG( 
 +                   B_NR number(7) Not Null, 
 +                   P_NR number(7) Not Null, 
 +                   ​B_Kunde varchar2(30),​  
 +                   ​B_Adresse varchar2(30),​  
 +                   ​B_Zahlungsmittel varchar2(30),​  
 +                   ​primary key(B_NR),​ 
 +                   ​foreign key(P_NR) 
 +                   ​references pizza(P_NR) 
 +                   )  
 +                   ​tablespace Users";​ 
 +$result_1 = ociparse($db,​$tab_pizza ); 
 +ociexecute($result_1);​ 
 +$result_2 = ociparse($db,​$tab_bestellung ); 
 +ociexecute($result_2);?>​ 
 +</​code>​
kurs/php12_1.txt · Last modified: 2014/09/10 21:22 (external edit)