Oliver Etzel wrote:
>
> Hello,
>
> I am Newbie and I am trying to get a reply from a database (which is called
> "Artikel") in my MySQL version 3.22.21. I am running Linux 6.2 using Perl
> 5.005.
>
> 2) The Problem I have is, that I cannot get a reply from the select
> statement that database. The short script is attached here, using the
> DBI.pm
> Module:
>
> #!/usr/bin/perl -w
> use CGI;
> use DBI;
> use CGI::Carp;
>
> use CGI qw(:standard);
> CGI::use_named_parameters(1);
>
> my $dbh = DBI->connect('DBI:mysql:Artikel');
> my $output = new CGI;
>
> print header, start_html ('TITLE'=>'Question with Popupmenu');
> print <<END_OF_HTML;
> <p>
> <H1>Abfrage mit POPUP Menu</H1>
> <FORM ACTION="abfrage_1.pl" METHOD=POST>
> <INPUT TYPE=HIDDEN NAME="action" Value="abfrage_1.pl">
>
> <H1>Abfrage:</H1>
> <BR>
> END_OF_HTML
> my @cd_ids = ();
> my %cd_artists = ();
> my $out = $dbh->prepare("select cd_id, cd_artist from Artikel.cd order by
> cd_artist \g");
< ... >
> Oliver Etzel
Hi Oliver
You should not apend \g to your query.
This is only needed in the mysql commandline interface to distinguish two queries.
Also you should print out error messages.
Tschau
Christian