Gossamer Forum
Home : General : Perl Programming :


Quote Reply
Dont know if this might be a Perl Problem

Can any one tell me what is wrong with this? I have looked at tec references and I cannot see what is wrong. Can I put it together like this? I want to lift the whole row Name and collectit to use in another perl script but I cannot get past this and would it actually let me do this? It is in MySql Apache and Perl

use DBI;
$DBH= DBI->connect("DBI:mysql:Guide")or die "\n

($DBI::err) : $DBI::errstr\n";
$sth= $DBH->prepare(qq{$DBH->select_arrayref()
select Name
from Family
while(@row =$sth->fetchrow_array)
print qw($row[0]\t$row[2]\n);

I get this message:

Bla Bla

DBD ::mysql::st execute failed: you have an error in your SQL syntax near 'DBI::db=HASH(0x1b172a4)->select_arrayref()

select Name

from Family

whil' at line 1 a C:/ bla bla line 11

line 11 seems to be });

Any Ideas at all please thanks Chris

Quote Reply
Re: [Silver Machine] ERROR:'DBI::db=HASH(0x1b172a4)->select_arrayref() In reply to
please don't double post. I've replied with a posible fix in your other thread.

Limecat is not pleased.