Hello Master Coders,
This is working so far but I need to add an additional search.
This is what I have so far:
$in_list = "'".join("','",$cen_chiefs)."'";
$query_cen_chiefs = "SELECT * FROM central WHERE CONCAT(strName,'
',strCity,' ',strState) IN({$in_list}) ORDER BY conName";
I a
ginal Message - From: "Jim Lucas" <[EMAIL PROTECTED]>
>> To: "kvigor" <[EMAIL PROTECTED]>
>> Cc:
>> Sent: Saturday, June 30, 2007 1:46 AM
>> Subject: Re: [PHP] Selecting Rows Based on Row Values Being in Array
>>
>>
>&
ame,' ',strCity,' ',strState) it
worked. So what do I owe you?
- Original Message - From: "Jim Lucas" <[EMAIL PROTECTED]>
To: "kvigor" <[EMAIL PROTECTED]>
Cc:
Sent: Thursday, July 05, 2007 10:10 AM
Subject: Re: [PHP] Selecting Rows Bas
,strCity,' ',strState) it
worked. So what do I owe you?
- Original Message -
From: "Jim Lucas" <[EMAIL PROTECTED]>
To: "kvigor" <[EMAIL PROTECTED]>
Cc:
Sent: Thursday, July 05, 2007 10:10 AM
Subject: Re: [PHP] Selecting Rows Based on Row Values
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 concaten
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
kvigor wrote:
where is the part that it join()'s things together?
it's: $in_list = "'".join("','",$list)."'";
Good
what is the output of the join() call
it's: '7orange50lbs','8purple60lbs' //once echo'd
Fine
$query_One = "SELECT * FROM shoe WHERE CONCAT(size,color,weight)
IN({$in_lis
>>where is the part that it join()'s things together?
it's: $in_list = "'".join("','",$list)."'";
>>what is the output of the join() call
it's: '7orange50lbs','8purple60lbs' //once echo'd
$query_One = "SELECT * FROM shoe WHERE CONCAT(size,color,weight)
IN({$in_list})";
This is the results of $
kvigor wrote:
Jim,
Thanks for all you help. Tell me where to mail you the check "seriously".
If we get this right I'll owe you.
OK, the query string now looks like you said it would. However Query isn't
returning a match.
//DETAILS=
kvigor wrote:
Jim,
Thanks for all you help. Tell me where to mail you the check "seriously".
If we get this right I'll owe you.
OK, the query string now looks like you said it would. However Query isn't
returning a match.
//DETAILS=
Jim,
Thanks for all you help. Tell me where to mail you the check "seriously".
If we get this right I'll owe you.
OK, the query string now looks like you said it would. However Query isn't
returning a match.
//DETAILS=
My $list array lo
kvigor wrote:
Ok Jim,
This is what I have so far and I'm still working it out.
$in_list = "".join('',$someArrayList); // do I really need to concatenate
it needs to be
$in_list = "'".join("','",$someArrayList)."'"; // you need the quotes!!
or separate anything here since my array v
I don't even being to understand your question, but it's a MySQL
question anyway.
http://dev.mysql.com/
On Sat, June 30, 2007 12:18 am, kvigor wrote:
> Hello All,
>
> I'm attempting to return rows from a mysql DB based on this criteria:
>
> I have a list, in the form of an array that I need to co
each, and haven't seen comparable code.
>>
>> I'm asking because I don't know where we're telling the code to compare
>> the values.
>>
>> You stated...
>>>>> and create one string from them
>> Where do I give the name to the
So this is where I am so far:
$sql = "SELECT* FROM table WHERE CONCAT(size,color,weight) IN( )";
"Jim Lucas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
K. Hayes wrote:
Will do. Thanks.
- Original Message - From: "Jim Lucas" <
.
>>
>>
>> - Original Message - From: "Jim Lucas" <[EMAIL PROTECTED]>
>> To: "kvigor" <[EMAIL PROTECTED]>
>> Cc:
>> Sent: Saturday, June 30, 2007 1:46 AM
>> Subject: Re: [PHP] Selecting Rows Based on Row Values Being in
K. Hayes wrote:
Will do. Thanks.
- Original Message - From: "Jim Lucas" <[EMAIL PROTECTED]>
To: "kvigor" <[EMAIL PROTECTED]>
Cc:
Sent: Saturday, June 30, 2007 1:46 AM
Subject: Re: [PHP] Selecting Rows Based on Row Values Being in Array
kvigor wrote
Will do. Thanks.
- Original Message -
From: "Jim Lucas" <[EMAIL PROTECTED]>
To: "kvigor" <[EMAIL PROTECTED]>
Cc:
Sent: Saturday, June 30, 2007 1:46 AM
Subject: Re: [PHP] Selecting Rows Based on Row Values Being in Array
kvigor wrote:
Hello All
kvigor wrote:
Hello All,
I'm attempting to return rows from a mysql DB based on this criteria:
I have a list, in the form of an array that I need to compare against each
row
in the table. Where theres a match I need that entire row returned.
e.g.$varListof 3outOf_10Fields = array(6blue4
19 matches
Mail list logo