🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #14207

Re: perl en mysql vraagje

#14207
From: iLs
Date: Sat, 24 Mar 2001 08:19
76 lines
2495 bytes
leuk password, anneleen :)

Franky Claeys <franky.claeys@vt4.net> wrote in message
news:99fsr9$6np$1@mykenos.hogent.be...
> hallo,
>
>
> heb hier een probleempje met een perl/cgi scriptje. Hoe ik ook probeer, ik
> krijg het maar niet aan de praat.
> Ik krijg steeds de volgende foutboodschap:
> use of uninitialized value at ticktest.pl line 29 (#1)
> (w) An undefined value was used as if it were already defined. It was
> interpreted as
> a "" or as 0, but maybe it was a mistake. To suppress this warning assign
an
> initial value to your variable.
>
> Ik ben nogal newbie en daardoor zie ik de fout dus niet echt staan in het
> onderstaand script (alhoewel ik voel dat het misschien wel heel voor de
hand
> liggend is).
> Ik gebruik perl en MySQL op een linux redhat 6.1.
>
> bedankt alvast
>
> Frank
>
> www.franksite.net
>
>
>
>
>
> #!/usr/bin/perl
>
> use CGI;
> use DBI;
> use diagnostics;
> use Data::Dumper;
>
> $dbh = DBI->connect('dbi:mysql:test', 'root', 'anneleen');
>
> $sql="SELECT * from ticklist";
>
> $sth=$dbh->prepare($sql);
> $sth->execute;
> print <<"END";
> Content-type:text/html\n\n
>
> <html>
> <head>
> </head>
> <body bgcolor="#FAEBD7">
> END
> while (@rows=$sth->fetchrow_array)
> {
>     print <<"END";
> <p>testje</p>
> END
> for ($i=0; $i<=$#rows; $i++)
> {
> print "<h1>$rows[$i]</h1>"
>
> }
> print <<"END";
> <p>test2</p>
> END
> }
> print <<"END";
> </body>
> </html>
> END
> $dbh->disconnect;
>
>
>
Technical Details
Message-ID: <99hlf0$f81$1@dinkel.civ.utwente.nl>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!nntp.cs.ubc.ca!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!surfnet.nl!news.nic.utwente.nl!not-for-mail
References: <99fsr9$6np$1@mykenos.hogent.be>

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: 107324,c92c20c634f97d57
X-Google-Attributes: gid107324,public
X-Google-Thread: fcea4,c92c20c634f97d57
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2001-03-24 00:24:04 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!nntp.cs.ubc.ca!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!surfnet.nl!news.nic.utwente.nl!not-for-mail
From: "iLs" <iLs@cyberdude.com>
Newsgroups: be.comp.programming,nl.comp.programmeren
Subject: Re: perl en mysql vraagje
Date: Sat, 24 Mar 2001 09:19:45 +0100
Organization: University of Twente, Enschede, The Netherlands
Lines: 78
Message-ID: <99hlf0$f81$1@dinkel.civ.utwente.nl>
References: <99fsr9$6np$1@mykenos.hogent.be>
NNTP-Posting-Host: wit399106.student.utwente.nl
X-Server-Date: 24 Mar 2001 08:21:52 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200