close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

sitewide search

Thread began 4/13/2015 11:15 am by Jamie | Last modified 4/14/2015 2:01 pm by Ray Borduin | 793 views | 6 replies |

Jamie

sitewide search

Hi Ray

Am trying to put together a sitewide search for the front end of a site and have a question and an issue

1. the issue is that when I click submit on the search form, the result page errors with this:

Warning: mysql_query(): Unable to save result set in /home/motlemso/public_html/clients/template/search.php on line 81
MySQL client ran out of memory



2. when I do get the above working, how do I actually echo the results on the results page?

Have attached the file

Cheers

Jamie

Sign in to reply to this post

Ray BorduinWebAssist

How many results does that recordset return? It looks like you may be trying to load too much data into the page at one time. What are you doing with that recordset? Do you need all of the rows?

Run that query in php myadmin... how many rows does it return? I think you might need to optimize that query or at least limit the number of results to use it on a web page.

Sign in to reply to this post

Jamie

at the moment the database is almost empty as its a fresh install. have run the query in php myadmin and its showing 29 rows ( http://prntscr.com/6tcnf4 )

I appreciate that as the db grows that this will increase considerably, so what would be the best way to optimise the query? what would the 'best practice' be for creating full searchability for a visitor?

Sign in to reply to this post

jon211112

I think that query is wrong... it is written to return results exponentially... The screen shot shows that your query is returning 1.5 million results. That is too many results to load into the page at one time.

Sign in to reply to this post

Jamie

thanks jon... i was looking at the row number rather than the quantity returned and I can see that that would be far too many. I guess that would defintiley mean my query is wrong, but what would best practice be to achieve a sitewide search facility?

Sign in to reply to this post

Ray BorduinWebAssist

I'm thinking you want to use a UNION SELECT maybe... It is hard to say without understanding what the tables are being used for and what your intention is. Possibly separate recordsets for each table. I just don't know enough background about how the tables are used and what exactly you are trying to achieve. I can only say that the recordset you are creating is almost certainly not the right way to do it.

Sign in to reply to this post

Jamie

OK, I judt thought it would be a question of setting up the search wizard as I have done so that a visitor could search the entire sites content. Having not done a site search before, just not sure what the best practice is to achieve it.

Will revisit when I need to implement this as I was just playing around with it to see what it could do

Cheers

Jamie

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...