Hallo Leute
Hab es hinbekommen:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
if ($rows eq "") {goto Rechnungen;}
my $REkdnummer = "";
my $REkddatum = "";
my $REkdfirma = "";
my $REkdstrasse = "";
my $REkdhausnummer = "";
my $REkdplz = "";
my $REkdort = "";
my $REkdland = "";
my $REkdansprechpartner = "";
my $REkdtelefon = "";
my $REkdfax = "";
my $REkdemail = "";
$REkdnummer = $rows->[1][0];
$REkddatum = $rows->[1][1];
$REkdfirma = $rows->[1][2];
$REkdstrasse = $rows->[1][3];
$REkdhausnummer = $rows->[1][4];
$REkdplz = $rows->[1][5];
$REkdort = $rows->[1][6];
$REkdland = $rows->[1][7];
$REkdansprechpartner = $rows->[1][8];
$REkdtelefon = $rows->[1][9];
$REkdfax = $rows->[1][10];
$REkdemail = $rows->[1][11];
print "$REkdnummer \n";
print "$REkddatum \n";
print "$REkdfirma \n";
print "$REkdstrasse \n";
print "$REkdhausnummer \n";
print "$REkdplz \n";
print "$REkdort \n";
print "$REkdland \n";
print "$REkdansprechpartner \n";
print "$REkdtelefon \n";
print "$REkdfax \n";
print "$REkdemail \n";
Nur noch eine Kleinigkeit:
Wie kann ich prüfen, ob $rows leer, bzw. undefiniert ist. Das obere Konstrukt funktioniert, solange man eine existierende KD-Nummer angibt. Findet die Abfrage keinen Datensatz in der DB kommt dieser Fehler:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
+-----------------------------------------------------+
| E********** / Daten-Verwaltungs-Programm (EZ-DVP) |
+-----------------------------------------------------+
>> Rechnung erstellen <<
Rechnungskopf laden durch Eingabe der Kundennummer :100102
+----------+---------+---------+-----------+--------------+-------+-------+--------+-------------------+-----------+-------+---------+
| kdnummer | kddatum | kdfirma | kdstrasse | kdhausnummer | kdplz | kdort | kdland | kdansprechpartner | kdtelefon | kdfax | kdemail |
+----------+---------+---------+-----------+--------------+-------+-------+--------+-------------------+-----------+-------+---------+
+----------+---------+---------+-----------+--------------+-------+-------+--------+-------------------+-----------+-------+---------+
Use of uninitialized value $REkdnummer in concatenation (.) or string at ./EZ-DVP.pl line 2928.
Use of uninitialized value $REkddatum in concatenation (.) or string at ./EZ-DVP.pl line 2929.
Use of uninitialized value $REkdfirma in concatenation (.) or string at ./EZ-DVP.pl line 2930.
Use of uninitialized value $REkdstrasse in concatenation (.) or string at ./EZ-DVP.pl line 2931.
Use of uninitialized value $REkdhausnummer in concatenation (.) or string at ./EZ-DVP.pl line 2932.
Use of uninitialized value $REkdplz in concatenation (.) or string at ./EZ-DVP.pl line 2933.
Use of uninitialized value $REkdort in concatenation (.) or string at ./EZ-DVP.pl line 2934.
Use of uninitialized value $REkdland in concatenation (.) or string at ./EZ-DVP.pl line 2935.
Use of uninitialized value $REkdansprechpartner in concatenation (.) or string at ./EZ-DVP.pl line 2936.
Use of uninitialized value $REkdtelefon in concatenation (.) or string at ./EZ-DVP.pl line 2937.
Use of uninitialized value $REkdfax in concatenation (.) or string at ./EZ-DVP.pl line 2938.
Use of uninitialized value $REkdemail in concatenation (.) or string at ./EZ-DVP.pl line 2939.
Datensatzsuche beendet! [ENTER]
Last edited: 2012-10-05 14:45:57 +0200 (CEST)
Past brought us "SYS 64738". Present brought us "ctrl+alt+del". But what will future bring?