MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Hard time with form-based search using SQL



This one is really killing me. I have a form:

<FORM METHOD=POST ACTION="[process-search]">
<INPUT TYPE=HIDDEN NAME=mv_searchtype VALUE="sql">
<INPUT TYPE=HIDDEN NAME=mv_matchlimit VALUE="10">
<INPUT TYPE=HIDDEN NAME=mv_search_page VALUE="results">
<INPUT TYPE="text" SIZE="15" NAME="mv_searchspec">
<INPUT TYPE=HIDDEN NAME=mv_sql_query VALUE="select * from nebula where
author like '%?%' or title like '%?%' or description like '%?%' order by
title">
<INPUT TYPE="submit" NAME="mv_todo" VALUE="Search">
</FORM>

All I want to be able to do is shove the text the user types into the ? in
the SQL query. If I use the form as
above I get back all the records that literally have %?% as a character
sequence (it looks like Minivend isn't substituting any text for the ?, just
leaving it literally as "?"). If I take out the single quotes so I have %?%
instead of '%?%' I generate this error:

Runtime error: parse error near '%NULL% or title like %NULL% or description
like %NULL% order by title' at line 1 at
/opt/software/etc/mvend/lib/Vend/Scan.pm line 497

This should be so simple. What is it I'm missing?

Thanks in advance,

Tim


----------------------------------------------------
Tim Murphy

ICQ#: 10625966
 * Page me online: http://www.mirabilis.com/10625966
 * E-mail Express: 10625966@pager.mirabilis.com

Work: +1 514.499.3344
Fax: +1 514.499.3223
----------------------------------------------------



----------------------------------------------------
Tim Murphy

ICQ#: 10625966
 * Page me online: http://www.mirabilis.com/10625966
 * E-mail Express: 10625966@pager.mirabilis.com

Work: +1 514.499.3344
Fax: +1 514.499.3223
----------------------------------------------------

winmail.dat


Search for: Match: Format: Sort by: