Search Issue

22 posts by 3 authors in: Forums > CMS Builder
Last Post: June 9, 2010   (RSS)

By thenetgirl - June 4, 2010

http://consumerf.exedor.net/grantees.php

everything seems to be working on the search about midway down the page except for the years they return everything not jsut the year selected. HELP PLEASE

<form method="POST" action="granteesList.php">
&nbsp;<div align="center">
<table border="0" width="98%" id="table5">
<tr>
<td width="118"><font face="Arial"> <div class="normal"><b>Select Year:
</b> </div></td>
<td>
<select name="g_year" size="1" style="font-family: Arial; font-size: 12pt; width: 200px;">
<option value="" ></option>
<option value="2001" >2001</option>
<option value="2002" >2002</option>
<option value="2003" >2003</option>
<option value="2004" >2004</option>
<option value="2005" >2005</option>
<option value="2006" >2006</option>
<option value="2007" >2007</option>
<option value="2008" >2008</option>
<option value="2009" >2009</option>
</select></td>
</tr>
<tr>
<td width="118"><font face="Arial">
<div class="normal"><b>Select Name:</b></div></td>
<td><font face="Arial">
<select name="g_name" style="font-family: Arial; font-size: 9pt; width: 200px;" size="1">
<option value="" ></option>
<?php foreach ($granteesRecords as $record): ?>
<option value="<?php echo $record['g_name'] ?>"><?php echo $record['g_name'] ?></option>
<?php endforeach ?>
</select></td>
</tr>
<tr>
<td width="118"><b>Search For:</b></td>
<td><input type="text" name="g_mission_keyword" value="" style="font-family: Arial; font-size: 9pt; width: 200px;" size="1"></td>
</tr>
</table>
</div>
<p>
&nbsp;<input type="image" src="buttons/searchbutton.gif" border="0" name="I2">

</p>

</form>



THANKS
Patricia

www.thenetgirl.com

Re: [thenetgirl] Search Issue

By Jason - June 4, 2010

Hi,

Is your field "g_year" being stored in the database as a textfield, or as a date?

Let me know and we'll see what we can do.

Thanks.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Search Issue

By thenetgirl - June 4, 2010

textfield
Patricia

www.thenetgirl.com

Re: [chris] Search Issue

By thenetgirl - June 4, 2010

I had to add another search field to and it crosses 2 data bases trust and grantees the common thing is trust_id

it fills it out but again returns everything.



here are both files.
Patricia

www.thenetgirl.com
Attachments:

granteeslist.php 12K

grantees.php 14K

Re: [thenetgirl] Search Issue

By Chris - June 5, 2010

Okay, my best guess here is that CMSB is assuming that you're talking about a date field called "g". It makes assumptions like that when fields called *_year, *_month, and *_day get searched on.

Can you try renaming your g_year field to, say, g_year_awarded or something that wouldn't match the pattern *_year?

Please let me know if that helps. If not, please fill out a Second Level Support Request and we'll get this figured out for you.
All the best,
Chris

Re: [chris] Search Issue

By thenetgirl - June 6, 2010

ok that seemed to fix the year search --------Yeaah

but not my next problem with the trust search

<select name="trust_name" style="font-family: Arial; font-size: 9pt; width: 200px;" size="1">
<option value="" ></option>
<?php foreach ($trustsRecords as $record): ?>
<option value="<?php echo $record['trust_id'] ?>"><?php echo $record['trust_name'] ?></option>
<?php endforeach ?>
</select>

again their are 2 databases one is a list of trusts(15) and the other is the grantees(640) the one common item is the trust_id so I am thinking some type of

if trust_id on thetrusts <?php foreach ($trustsRecords as $record): ?>
= trust_id on grantess ($granteesRecords, as $record) out put this list ????

and some will have no Results and I want it to say that too.

thanks
Patricia

www.thenetgirl.com

Re: [chris] Search Issue

By thenetgirl - June 7, 2010

Incase I didnt mention it they are trying to go live friday with a big news release. I have alerted them that it may not be working and i would remove it till I got it working if not before they go live.



Thanks

PG
Patricia

www.thenetgirl.com

Re: [thenetgirl] Search Issue

By Jason - June 7, 2010

Hi,

Since there doesn't seem to be a field called "trust_name" in the grantees table, try renaming the select field to "trust_id".

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Search Issue

By thenetgirl - June 7, 2010

that didnt work at all it jut pulls the # off the trust data base the name is on the grantees database
Patricia

www.thenetgirl.com