No not trying to trick you at all. It's just that because of an incident I
had on a previous site with giving actual table names etc. I had another one
helping me through forums. I actually share too much info. as a result my
DB was ruined...
At any rate had no clue about combined_string it showed me the error of my
ways. I am reading a file into an array using file( ). So "SELECT
CONCAT(strName,strCity,strState) AS combined_string FROM central" helped me
to see error of my way so I changed the statement to.
SELECT * FROM central WHERE CONCAT(strName,' ',strCity,' ',strState) it
worked. So what do I owe you?
----- Original Message -----
From: "Jim Lucas" <lists@xxxxxxxxx>
To: "kvigor" <k3cheese@xxxxxxxxxxxxx>
Cc: <php-general@xxxxxxxxxxxxx>
Sent: Thursday, July 05, 2007 10:10 AM
Subject: Re: Selecting Rows Based on Row Values Being in Array
kvigor wrote:
Sorry,
That was a typo there's on one IN clause.
here is how it reads: SELECT * FROM central WHERE
CONCAT(strName,strCity,strState) IN('7orange50lbs','8purple60lbs').
So in my table I have 8 in size column, purple in color column, and 60lbs
in weight column.
Since the concatenated value will be 8purple60lbs, shouldn't MySQL return
that row? Thanks for your patience.
Ok, well, here is what I would do now. Just to make sure things are as we
are assuming they are.
SELECT CONCAT(strName,strCity,strState) AS combined_string FROM central
print the results of that sql and see if combined_string looks like what
we think it should be.
This you can do in phpmyadmin.
oh, what is up with the naming conventions? Trying to trick us?
To me it would not be obvious that you are storing colors in column for
what looks like a city name.
Just wondering...
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php