superfrink has asked for the wisdom of the Perl Monks concerning the following question:
I see the URL for the search result like:SELECT *, URL FROM google WHERE q = "perl monks" LIMIT 1
When I query:$VAR1 = { 'cached_size' => '', 'snippet' => '', '_u_r_l' => '', 'summary' => 'Contains tutorials, discussion forums, <b>Perl</b> p +oetry, obfuscated code, and a large code repository.', 'directory_category' => '', 'url' => 'http://www.perlmonks.org/', 'host_name' => '', 'title' => '', 'directory_title' => '' };
I get this result back:SELECT * FROM google WHERE q = "perl monks" LIMIT 1
$VAR1 = { 'cached_size' => '', 'snippet' => '', '_u_r_l' => '', 'summary' => 'Contains tutorials, discussion forums, <b>Perl</b> p +oetry, obfuscated code, and a large code repository.', 'directory_category' => '', 'host_name' => '', 'title' => '', 'directory_title' => '' };
use DBI; use strict; use Data::Dumper; my $KEY = "See http://www.google.com/apis/ to get a key."; my $dbh = DBI->connect("dbi:Google:", $KEY) or die("Can't connect to DB: " . $!); my $sth = $dbh->prepare(qq[ SELECT *, URL FROM google WHERE q = "perl monks" LIMIT 1 ]) or die("Can't prepare query: " . $!); $sth->execute() or die("Can't execute query: " . $!); while (my $r = $sth->fetchrow_hashref) { print Dumper($r), "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBD::Google " SELECT * " does not return URL.
by dakkar (Hermit) on Feb 05, 2005 at 15:12 UTC | |
by superfrink (Curate) on Feb 05, 2005 at 20:35 UTC | |
|
Re: DBD::Google " SELECT * " does not return URL.
by superfrink (Curate) on Jan 29, 2009 at 18:58 UTC |