RE: [PHP-DB] php/mysql query

2003-02-20 Thread Kelly Protsko
Well if the zip codes have something in common just do a pattern match
for them or are you just picking random zip codes?  This way you only
need one one sql statement to bring everything back.

Kelly

-Original Message-
From: Julie Keywell [mailto:[EMAIL PROTECTED]] 
Sent: February 20, 2003 10:01 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] php/mysql query

Hi there!

I am querying our database for 11,000 different zip codes and it seems
to be overloading MySQL.  However, common sense says it shouldn't.

My question is:
When needing to query 11,000 things, is it best to make 1 SQL statement
that has 11,000 ors, or run through individual querys 11,000 times?  Any
help would be wonderful!  I am making PHP do the counting rather than
MySQL.

Thanks!
Julie

--


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] php/mysql query

2001-07-22 Thread David Balatero

Actually, I am kind of confused.. =P ...why wouldn't SELECT * FROM table
WHERE (artist_id = '$id') work?

--
David Balatero
[EMAIL PROTECTED]
--

-Original Message-
From: Matt Nigh [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 22, 2001 6:30 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] php/mysql query


hi. i was wondering if the knowledgeable people on this list could help me
out with a problem i'm having.
what i need is this:
i want a single page that with a variable taken from a database, will
display a different page depending on the name of a band.
http://www.site.com/bands.php?artist=thebandsname

'artist' being the column from the database and 'thebandsname' being a
specific row in the 'artist' column

so basically what i need is some kind of statement sorta like this:
<--- start --->



<--- end --->

but instead of including a file, i wanna include a row from a specific
column, a little like
select * from table where artist = 'thebandsname'


so if anyone could help me with this or point me in the right direction, i'd
be very appreciative. also, if you don't understand what i mean, please feel
to ask and i'll try and explain a little better.


thanks in advance,


Matt Nigh



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]