marlboro_me Posted November 29, 2007 Share Posted November 29, 2007 Ok, this one is really confusing me... I have a PHP search page created with different filters and search field options. (First Name, Last Name, Drop-down Filter, etc.) What's happening is on some search results the page will display the record sets correctly from MySQL. (Short record results of less than 10 or refined by further filter options) But when you do a search for "Last Name" or larger open "filter options" it seems like it loses the connection to the database and displays no results. If users continually hit the search form button the database will eventually pull up the results. (30+ records) After clicking it again the results will go away. I was originally thinking it was the error 2003 (10061) error for not connecting to MySQL but I know it does since it pulls data on more refined search options. Has anyone experienced or know where to point me in the right direction for a solution? I'll post code later but wanted to hear from the guru's first. My feeling is it's not the code but something with losing the data packets with MySQL or the connection. But if that's the case, how could users press the search button multiple times (2-3) and display results?? Any help would be great! Quote Link to comment Share on other sites More sharing options...
marlboro_me Posted November 29, 2007 Author Share Posted November 29, 2007 BUMP... Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted November 29, 2007 Share Posted November 29, 2007 The mysql server is likely having problems. Your code should be checking all mysql function calls for an error or success, output a useful message to the visitor on an error (such as cannot complete the requested action), log all possible information about the error to the log file (such as the mysql_error() information) and then exit/die to prevent further problems. Find out if the problem is with connecting to the mysql server or if there are errors occurring when queries are made. It is possible that the form data is not being put into the query correctly and is causing sql syntax errors. Posting your code would help find if some of these type of problems are present in the code. 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.