othellotech Posted March 22, 2008 Share Posted March 22, 2008 I use the intelligent search feature, we have added it to every page How have you done that ? The "presentation" of it's not great, but it does seem a useful thing, and I'd tried to add it to the "navbar" so it was available on every page with <span class="navbutton"> <strong>Find:</strong> <input type="text" name="intellisearchval" id="intellisearchval" onKeyUp="run_query();" style="width:120px;" /> <a href="#" onclick="document.getElementById('intellisearchval').value='';document.getElementById('searchresults').style.display='none';return false"> <img src="images/delete.gif" align="absmiddle" border="0" /> </a> <div align="left" id="searchresults" style="border:2px solid #DFDCCE;background-color:#F7F7F2;padding:15px;margin-right:10px;display:none;" nowrap></div> </div> </span> which whilst its *displayed* everywhere, it only works on the HOME Admin-Dashboard page, as that appears to be the only file in WHMCS with the requisite search code 0 Quote Link to comment Share on other sites More sharing options...
sdavis Posted March 26, 2008 Share Posted March 26, 2008 We are implementing a quick search function from our intranet that hooks into WHMCS amongst other systems. The search does SQL queries on the database rather than using the API. I'm somewhat curious why most of the fields in the databases are text, rather than varchar. The performance of the database would be significantly superior if fields were varchar and indexed. I realize we can in fact make these changes if we like, without impacting WHMCS itself. None the less, I'm curious why text was chosen. To illustrate what I'm talking about, here are some queries I ran before and after changing to varchar and indexing. With lastname as text; EXPLAIN SELECT tblclients.* FROM tblclients WHERE tblclients.lastname LIKE 'Davis%' returns a search on all records. Creating a full text index on the text field doesn’t help. Changing lastname to varchar(80) reduces the number of rows searched to 17. Doing slightly more complex queries such as SELECT tblclients.* FROM tblclients WHERE tblclients.firstname LIKE 'S%' AND tblclients.lastname LIKE 'D%' reduces records searched to 131 with a result set of 43 records. 0 Quote Link to comment Share on other sites More sharing options...
HiDef-Laws Posted March 31, 2008 Share Posted March 31, 2008 Would be nice to get this searching through custom fields for all products in all package types. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.