-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Skip Evans wrote:
I have a table like this:
boroughIDArea
=
1Chelsea
1East Village
1West Village
1So Ho
2Prospect Park
2Brooklyn Heights
3Prospect Heights
What
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Dave W wrote:
Currently, here is my code:
$file = 'ip.txt';
$fh = fopen($file, 'r');
$theData = fread($fh, filesize($file));
fclose($fh);
$ips = array($theData);
...
Since it's a numeric array, I shouldn't need quotes around the ip
SELECT count( * )
FROM `bsp_area`
GROUP BY boroughID ORDER BY count(*) DESC LIMIT 1
Bastien
From: [EMAIL PROTECTED]
To: Bastien Koert [EMAIL PROTECTED]
CC: [EMAIL PROTECTED], php-db@lists.php.net
Subject: RE: [PHP-DB] Using MAX with COUNT?
Date: Sat, 22 Jul 2006 20:25:57 -0600 (MDT)
Hi
I figured it out before, but I didn't hit reply all. I used files() and
newlines to create it. Would using explode be a more reliable way?
On 7/23/06, Stut [EMAIL PROTECTED] wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Dave W wrote:
Currently, here is my code:
$file = 'ip.txt';
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Dave W wrote:
I figured it out before, but I didn't hit reply all. I used files() and
newlines to create it. Would using explode be a more reliable way?
I assume you mean the file() function, not files(). The only problem
with doing it that way is
Well, its what I want so I could do a foreach array like this and print out
the ips in a table:
foreach($ips as $value) {
$value = trim($value);
$domain = gethostbyaddr($value);
echo tr class=\alternate\
th scope=\row\3/th
td$value/td