Jump to content

PHP/MySQL Seems to Time Out


andygrant

Recommended Posts

I have a problem on a webpage that is doing a SELECT across two tables. The tables have approx 4000 records each and return approx 4000 records, each table only has fewer than 10 fields.

 

It is a simple SELECT statement linking the two tables so the statement isn’t wrong and it runs fine using some MySQL software. But the problem is that when I try to run the statement from a PHP webpage it seems to time out. It doesn’t give any PHP error it just gives says ‘Internet Explorer cannot display the webpage’ as if the webpage doesn’t exist.

 

I have increased the ‘memory_limit’ and ‘max_execution_time’ and also tried ‘set_time_limit(0)’ but they didn’t have any affect.

 

Does anyone have any idea what could be causing this to not load? Does this sound like PHP/MySQL is timing out?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/138186-phpmysql-seems-to-time-out/
Share on other sites

How long does the query take to execute when you enter it directly in your mysql software?

 

Your php code likely contains a logic error that is causing it to execute endlessly. You would need to post your code to get any specific help with what it might be doing.

SELECT * FROM  tblClients, tblPersonalDetails WHERE personalLink = 'client' AND personalLinkID = clientID

 

The statement I'm running is above, as you can see it is pretty simple so I don't see how there could be an error in in. Basically it just links two tables together, if I do a LIMIT it works better.

 

There will only be one tblPersonalDetails record to match each tblClients record.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.