Search Issue

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

By thenetgirl - June 7, 2010

This pulls the number but doesnt put the g_ name which is there on the grantees data base
& just doesnt produce the list of who go what trust.

<td width="118" align="right"><font face="Arial"><b>Trust Names:</b></td>
<td><font face="Arial">
<select name="trust_name" style="font-family: Arial; font-size: 10pt; width: 200px;" size="1">
<option value="" ></option>
<?php foreach ($trustsRecords as $record): ?>
<option value="<?php echo $record['trust_id'] ?>"><?php echo $record['trust_id'] ?>
</option>
<?php endforeach ?></select></td>
Patricia

www.thenetgirl.com

By Jason - June 7, 2010

Hi,

Okay, if the name is being stored in the grantees table, change the name of the <select> back to whatever the name of the "Trust Name" field is.

So if the it's the name being stored, not the id, then the value of the <option> tags needs to be the name.

Try this:

<td width="118" align="right"><font face="Arial"><b>Trust Names:</b></td>
<td><font face="Arial">
<select name="trust_name" style="font-family: Arial; font-size: 10pt; width: 200px;" size="1">
<option value="" ></option>
<?php foreach ($trustsRecords as $record): ?>
<option value="<?php echo $record['trust_name'] ?>"><?php echo $record['trust_name'] ?>
</option>
<?php endforeach ?></select></td>


Note: it's very important that the name of the <select> field is the same as the name of the field in the grantee table, not the trustee table.

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 - edited: June 7, 2010

that can't possibly work and it doesnt the trust_id is the only common thing on both databases.

on the trust database is

trust_id
trust_name
trust_desc
trust_active


on the granteees database is

g_id
trust_id
g_year_awarded
g_amount
g_term
g_name
g_contact
g_contact_title
g_address
g_phone
g_email
g_website
g_mission


I need to say get the trust id give it a name on the pulldown list (which I had) working

and produce a list of clients that have that grant <-----this I dont have
Patricia

www.thenetgirl.com

By Jason - June 8, 2010

Hi,

Okay. So we're compiling a list of trustees from the trust table (id, and name) and are trying to retrieve a list of grantees from the grantee database that have that same trust_id. Correct?

The correct way to do this then would be as follows:

<td width="118" align="right"><font face="Arial"><b>Trust Names:</b></td>
<td><font face="Arial">
<select name="trust_id" style="font-family: Arial; font-size: 10pt; 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></td>


It is important that the <select> field have the same name as the field you are trying to search on in the grantees table (trust_id). It will search using the value of the option selected (trust_id).

Give this a try. If this doesn't work, please email me your CMS Login and FTP details to jason@interactivetools.com and I'll take a closer look for you.

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 8, 2010

Ok sent



In stead of everything now we have - No records were found! for all of them. I know levi has stuff not sure about all the others
Patricia

www.thenetgirl.com

Re: [Jason] Search Issue

By thenetgirl - June 8, 2010

unfortuamately those 2 tables were imported
Patricia

www.thenetgirl.com

By Jason - June 8, 2010

Hi,

You can still make the change to the list field. That way it may be easier to spot which ones need to be changed.

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 8, 2010

What I think happened was a mixup when manually entering trust_id's into the grantee table. The easiest way to get around this, is to set up the trust_id field in the be a list that takes it's values from the trusts table. It should use "trust_id" for the option values and "trust_name" as the option labels. This will help stop mix ups in the future. [/#000000]

[/#000000]

I am not sure what your mean here?[/#000000]
Patricia

www.thenetgirl.com

By thenetgirl - June 8, 2010

never mind jason i think its working right now ...........for what i have in the database
Patricia

www.thenetgirl.com