DMXzone Database Connector PHP Support Product Page

Complex Search Engine

Asked 21 May 2014 19:21:09
1
has this question
21 May 2014 19:21:09 Randy Riesterer posted:
I've spent the last several days on this with only partial success. I'd like a complex search form with several AND/OR search parameters that will display its results in a single table. Can you give me guidance how to use Connector, Data Bindings, or Formatter to do this or direct me to a tutorial that would help me? This type of an engine is CRITICAL to a site I am designing.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>

<body>
    <form id="frmAuthor" name="frmAuthor" method="get" action="">
    <table id="outline_all" width="54%" border="0" cellpadding="4">  
      <tr>  
        <th align="left" bgcolor="#8EA6C0" class="textbody"><strong>  
          <input name="Button" type="button" id="button" onclick="MM_goToURL('parent','pubs_search_incl.php');return document.MM_returnValue" value="Clear Searches " />  
        &nbsp;(U) Search  Database for an Article</strong></th>  
      </tr>  
      <tr>  
        <td align="center" nowrap="nowrap" bgcolor="#E4EAFA" class="textbody">  
          <span class="redtext">by</span><strong> Author:</strong>  
          <input name="Author" type="text" id="Author" size="40" />
        &nbsp; <br /></td>  
      </tr>  
      <tr>
        <td align="center" nowrap="nowrap" bgcolor="#E4EAFA" class="textbody">
          <label for="select"></label>
          <select name="select" id="select">
            <option value="AND">AND</option>
            <option value="OR">OR</option>
          </select>
        </td>
      </tr>
      <tr>  
        <td align="center" nowrap="nowrap" bgcolor="#E4EAFA" class="textbody">  
          <span class="redtext_lrg">OR</span><span class="redtext"> by</span> <strong>Title Keyword:</strong>  
          <input name="Title" type="text" id="Title" size="40" />
          &nbsp; <br /></td>  
      </tr>  
      <tr>
        <td align="center" nowrap="nowrap" bgcolor="#E4EAFA" class="textbody"><select name="select2" id="select2">
          <option value="AND">AND</option>
          <option value="OR">OR</option>
        </select></td>
      </tr>
      <tr>  
        <td align="center" nowrap="nowrap" bgcolor="#E4EAFA" class="textbody">  
          <span class="redtext_lrg">OR</span> <span class="redtext">by</span> <strong>Category:</strong>  
    <select name="Category" id="Category" data-binding-repeat-children="{{pub_categories.data}}" data-binding-id="select" data-binding-src="{{Category}}">  
      <option value="{{Category}}">{{Category}}</option>  
        </select>  
          <br />
          <br />
<input name="Find3" type="submit" id="Find3" onclick="dmxDataBindingsAction('refresh','search_category',{})" value="Find" />  
    &nbsp; <br />  
        </td>  
      </tr>  
    </table> 
</form> 
<br />  
    <table>  
    <tr data-binding-repeat="{{search_auth.data}}" data-binding-id="repeat2">  
          <td width="3%" valign="top" nowrap="nowrap" bgcolor="#E4EAFA" class="textbody"><a href="Documents/{{FileName}}" target="_top" class="hilight_link">&nbsp;Get Article</a></td>  
          <td valign="top" bgcolor="#E4EAFA" class="textbody">{{SubmitDate}}</td>  
          <td valign="top" bgcolor="#E4EAFA" class="textbody">{{Category}}</td>  
          <td valign="top" bgcolor="#E4EAFA" class="textbody">{{Author}}</td>  
          <td valign="top" bgcolor="#E4EAFA" class="textbody">{{Title}}</td>  
          <td valign="top" bgcolor="#E4EAFA" class="textbody">{{JUAID}}</td>  
          <td valign="top" bgcolor="#E4EAFA" class="textbody">{{IssueNumber}}</td>  
          <td valign="top" bgcolor="#E4EAFA" class="textbody">{{Volume}}</td>  
      </tr>  
    </table>  
</body>
</html>

Replies

Replied 22 May 2014 13:02:02
22 May 2014 13:02:02 Randy Riesterer replied:
Progress. I've gotten the search by Author and/or Title Keyword to work perfectly - so I'm halfway there. Now, I need to figure out how to find data via a selected item from my dynamic dropdown named 'Category'.

In other words, how do I filter data by selecting an item listed in a dynamic dropdown? Can you give me a nudge/hint how to do this?

Reply to this topic