Jump to content

PHP Causing Internal Server Error


Canman2005

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.