Canman2005 Posted August 18, 2009 Share Posted August 18, 2009 Hi all I have something wierd happening. I have a standard QUERY SELECT * FROM `users` WHERE `live` = '0' ORDER BY `fname` ASC but this seems to cause my page an Internal Server Error If I adjust that QUERY to SELECT * FROM `users` WHERE `live` = '0' ORDER BY `fname` ASC LIMIT 980 then it runs the page fine and no Internal Server Error DOes anyone know why this might be happening? THanks in advance Dave Quote Link to comment Share on other sites More sharing options...
trq Posted August 18, 2009 Share Posted August 18, 2009 Post your code. Quote Link to comment Share on other sites More sharing options...
trq Posted August 18, 2009 Share Posted August 18, 2009 Actually, how many records does the first query pull? I see you've limited your second to 980.... what on earth are you planning on doing with that much data within a web page? Quote Link to comment Share on other sites More sharing options...
Canman2005 Posted August 18, 2009 Author Share Posted August 18, 2009 The code is $sql = "SELECT * FROM `users` WHERE `live` = '0' ORDER BY `fname` ASC"; $show = @mysql_query($sql, $connection) or die(mysql_error()); while ($row = mysql_fetch_array($show)) { } There is around 1,800 records and I load that much data on one page as I need it for a report im doing. Do you think its just overloading the server? I was simply doing a LIMIT to see if I could find the point at where there is an issue and then I may have been able to nail it down to a particular record in the database Quote Link to comment Share on other sites More sharing options...
trq Posted August 18, 2009 Share Posted August 18, 2009 Yep, I would say that is making your script timeout. Quote Link to comment Share on other sites More sharing options...
kickstart Posted August 18, 2009 Share Posted August 18, 2009 Hi Not sure it would overload it on its own, but would probably depend on the data (one reason to avoid SELECT *). Eg, if you are storing a high res image of each user in the users table then it will take a massive amount of space and is also unlikely to be of any use for a report. All the best Keith Quote Link to comment Share on other sites More sharing options...
Canman2005 Posted August 18, 2009 Author Share Posted August 18, 2009 thanks guys, ill do some work on the query script 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.