I have a problem with the below query not producing a result. There is nothing wrong with the query. But it is being run after a lot of other time and memory consuming instructions within a PHP script. If I restrict the number of operations performed in the script before this query is executed, it works.
How do I find out what the problem is? Is there a way to be notified if the script exceeds memory or execution time limitations? Or could there be another reason?
$query="SELECT * FROM user" or die(mysql_error());
$result=mysql_query($query);
if($result)
{
success();
}
else //error
{
failure();
}