Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
This is the data found in my database as told by PHPMyAdminmy $data = qq(SELECT search, engine, time FROM searches WHERE DATE_SUB +(CURDATE(),INTERVAL 7 DAY) <= time); my $sth = $dbh->prepare($data); $sth->execute() or die $dbh->errstr; my ($search, $engine, $date); $sth->bind_columns(\$search, \$engine, \$date); while($sth->fetch) { print "$search $engine on $date<br>"; }
It printsEdit Delete 1 this is fun Google 2006-08- +10 10:48:21 Edit Delete 2 oh yeah About 2006-08-10 + 11:15:18 Edit Delete 3 yet another About 2006-08-10 +11:15:26 Edit Delete 4 this is fun Excite 2006-08-1 +0 11:15:35 Edit Delete 5 another on this Excite 2006-0 +8-10 11:15:44 Edit Delete 6 testing Dogpile 2006-08-10 11:15 +:592006-08-10 11:15:59
But from the times, you can see each of these are within the last 7 days and I'm confused why it's not printing them, too.this is fun Google on 006-08-10 10:48:21
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: sth fetch only grabbing back first result
by madbombX (Hermit) on Aug 10, 2006 at 18:11 UTC | |
by Anonymous Monk on Aug 10, 2006 at 19:20 UTC | |
by madbombX (Hermit) on Aug 10, 2006 at 19:39 UTC | |
by Ieronim (Friar) on Aug 10, 2006 at 19:43 UTC | |
|
Re: sth fetch only grabbing back first result
by jZed (Prior) on Aug 10, 2006 at 18:36 UTC | |
by Anonymous Monk on Aug 10, 2006 at 19:05 UTC | |
|
Re: sth fetch only grabbing back first result
by gcalexander (Novice) on Aug 10, 2006 at 18:19 UTC | |
by friedo (Prior) on Aug 10, 2006 at 18:52 UTC | |
by webfiend (Vicar) on Aug 10, 2006 at 22:30 UTC | |
by gcalexander (Novice) on Aug 12, 2006 at 03:35 UTC |