andygrant Posted December 23, 2008 Share Posted December 23, 2008 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 Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted December 23, 2008 Share Posted December 23, 2008 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. Quote Link to comment Share on other sites More sharing options...
andygrant Posted December 23, 2008 Author Share Posted December 23, 2008 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. 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.