[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] Searching multiple columns in MySQL problem
At 05:26 PM 10/19/1999 , you wrote:
>****** message to minivend-users from Daniel Ceregatti
<daniel@digitalsavant.com> ******
>
>CGI is escaping the %'s, since these appear in the MySQL logs...the first
set reads: '% word_that_was_searched_for %', whereas the two subsequent
ones read: '% %'. As far as the <input...> tag, if type= is not specified,
it defaults to text.
If I'm not careful, I might just learn something!
>
>Thanks for the response though! :)
>
>Ryan Hertz wrote:
>
>> ****** message to minivend-users from Ryan Hertz
<rhertz@gyb.baits.com> ******
>>
>> At 02:10 PM 10/19/1999 , you wrote:
>> >****** message to minivend-users from Daniel Ceregatti
>> <daniel@digitalsavant.com> ******
>> >
>> >I'm sorry to be posting this again, but I've still not come to any
>> conclusion to this problem. Seeing how many questions, even newbie
>> questions, get answered quite readily, I can only presume this question was
>> overlooked, or that this problem has no solution. I'd rather believe the
>> former.
>> >
>> >I'm trying to do a blanket search of the products database, in 3 columns,
>> for keywords.
>> >
>> >Here's my code:
>> >
>> ><FORM ACTION="[process-search]" METHOD=POST>
>> ><INPUT TYPE="hidden" NAME="mv_searchtype" VALUE="sql">
>> ><INPUT TYPE=hidden NAME=mv_sql_query
>> > VALUE="select code from products where comment like '% ? %' or
>> description like '% ? %' or category like '% ? %'">
>> ><INPUT MAXLENGTH="30" NAME="mv_searchspec" SIZE="13" VALUE="">
>> ><INPUT TYPE="submit" VALUE="Search">
>> ></FORM>
>> >
>> >If the word that's being searched for is in the "comment" column, the
>> search succeeds and returns the appropriate results. But if the word is in
>> either the description or category column, it doesn't work. From the mysql
>> logs, the search parameter is not being passed to the last two "?"'s, only
>> the first.
>> >
>> >So, how does one search more than one column in the products table with
>> sql in a single search text box? is it just not possible? Do I have to
>> create a glimpse search table every time the products table changes in
mysql?
>> >
>> >Any answer is welcome, even if it's not what I want to hear. Just knowing
>> that _someone_ read this will make me feel better. :)
>>
>> I know almost nothing about SQL, but I do know a thing or two
about the
>> Common Gateway Interface. I wonder if perhaps those %'s cause a problem.
>> Do they need to be escaped?
>> Just thought I'd stab at it, ya know.
>>
>> Oh, and one more thing, this line:
>>
>> ><INPUT MAXLENGTH="30" NAME="mv_searchspec" SIZE="13" VALUE="">
>>
>> Don't you need to declare what type of INPUT that is? (HTML)
Something
>> along the lines of TYPE=TEXT? I guess that might be a typo.
>>
>> >
>> >Thanks.
>> >
>> >--
>> >
>> >Daniel Ceregatti
>> >
>> >Programmer - Digital Savant
>> >
>> >Phone: (323) 848-7964 x106
>> >Fax: (323) 871-2499
>> >7039 Sunset Blvd., Suite 200
>> >Hollywood, CA 90028
>> >
>> >
>> >
>> >-
>> >To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
>> >email with 'UNSUBSCRIBE minivend-users' in the body to
>> Majordomo@minivend.com.
>> >Archive of past messages: http://www.minivend.com/minivend/minivend-list
>> >
>>
>> Ryan Hertz tel 800-645-BAIT
>> Webmaster fax 520-645-2588
>> Advertising Director http://www.insideline.net
>> Gary Yamamoto Custom Baits, Inc. http://www.yamamoto.baits.com
>> -
>> To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
>> email with 'UNSUBSCRIBE minivend-users' in the body to
Majordomo@minivend.com.
>> Archive of past messages: http://www.minivend.com/minivend/minivend-list
>
>--
>
>Daniel Ceregatti
>
>Programmer - Digital Savant
>
>Phone: (323) 848-7964 x106
>Fax: (323) 871-2499
>7039 Sunset Blvd., Suite 200
>Hollywood, CA 90028
>
>
>
>-
>To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
>email with 'UNSUBSCRIBE minivend-users' in the body to
Majordomo@minivend.com.
>Archive of past messages: http://www.minivend.com/minivend/minivend-list
>
Ryan Hertz tel 800-645-BAIT
Webmaster fax 520-645-2588
Advertising Director http://www.insideline.net
Gary Yamamoto Custom Baits, Inc. http://www.yamamoto.baits.com