[ic] Form seach on other tables than Products
N.E.S.T. Solutions
nest_consulting at yahoo.ca
Sun Nov 19 00:23:04 EST 2006
Hi all,
I'm trying to make a form search work on a different table
than Products and I'm getting errors that I don't fully understand.
storelocator.html should:
1-search table "distributors" based on input text search on columns:
zipcode, province name, etc...
2-return to the same page and display results lower on the page
The problem seems to be when I use
form action="[area search]" with fi=distributors table, it gives me
this error, even though I specify another table which doesn't
have an "inactive" column:
"Sorry, there was an error in processing this form action. Please report
the error or try again later. (DBD::mysql::st execute failed: Unknown
column 'inactive' in 'where clause' at
/usr/local/spitfire-stores/lib/Vend/Table/DBI.pm line 1849. )"
I also tried <form action="[area @@MV_PAGE@@]", but that doesn't get me
any results
and the url doesn't have appended search specs added to it unless I
change
to method="refresh"
I pasted the code below, if someone can point me in the right direction
I would
really appreciate! Thanks in advance
Martin H.
N.E.S.T. Solutions
== storelocator.html == (based on the advanced_search code)
<snip>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr height="23">
<td class="titleb">
<img src="__THEME_IMG_DIR__/magnifier.gif" border="0">
<b>[L]Advanced Search[/L]</b>
</td>
</tr>
<tr height="23">
<td class="theadfill">
<form action="[area search]" method=post>
<input type=hidden name=mv_session_id value="[data session id]">
[seti storesearch]
fi=distributors
st=db
rf=code,distrib_name,address1,address2,provname,countryname,zipcode,phon
e1,phone1,fax
su=yes
sp=storelocator
ml=1000
[/seti]
<input type=hidden name=mv_profile value=storesearch>
<b>[L]Search by Field[/L]:</b>
</td>
</tr>
<tr>
<td class="tabline1">
[L]Search for[/L]
<input type=text name=mv_searchspec size=20 maxlength=30>
[L]in[/L]
<select name=mv_search_field>
[loop
lr=1
list="zipcode Zip Code
code Code
provname Province Name
"]
<option value="[loop-code]"[selected mv_search_field
[loop-code]]>[loc][loop-pos 1][/loc]
[/loop]
</select>
<input type="image" alt="[L]Search[/L]"
src="__THEME_IMG_DIR__go.gif" border=0>
</form>
</td>
</tr>
</table>
[search-region]
[on-match]We got nothing outta this search[/on-match]
[on-match]We got some results[/on-match]
[search-list]
== Will display distributors here ==
[/search-list]
<BR CLEAR=LEFT>
[more-list]
<BLOCKQUOTE>
[msg arg.0="[matches]" arg.1="[match-count]"]<font
class="titleb">Matches %s of %s found.</font>[/msg]
<BR><font class="titleb">[more]</font><BR>
</BLOCKQUOTE>
[/more-list]
[/search-region]
More information about the interchange-users
mailing list