Take the 2-minute tour ×

hi i was trying to do a query in drupal which selects every row in table, i was having an issue with the no of rows i was able to query for the query is working for 300row limit but if i increase it 400 it is going blank page.

$total_terms = 300;
$query = "SELECT N.nid ,N.tid FROM term_node N  ";
$query_result = db_query_range($query, $vid, 0, $total_terms);
share|improve this question
Exact duplicate. stackoverflow.com/questions/1527345 –  ceejayoz Oct 6 '09 at 21:06
Also, the last time you asked this, 100 worked but 190 didn't work. Why the change? –  ceejayoz Oct 6 '09 at 21:06
ceejayoz - more data? ;-) –  Michael Krelin - hacker Oct 6 '09 at 21:09
i changed the query –  pmarreddy Oct 6 '09 at 21:16
CHECK YOUR LOGS!!!!!!!! –  Byron Whitlock Oct 6 '09 at 21:31
show 5 more comments

2 Answers

You are probably timing out, or exceeding your memory limit. Check the Apache and PHP logs.

share|improve this answer
i have increased the memory to 96mb but still same problem. –  pmarreddy Oct 6 '09 at 21:19
how long before it goes blank? if it is about 30 seconds it is most likely the time limit. –  Byron Whitlock Oct 6 '09 at 21:31
Did you check the logs? –  Henrik Opel Oct 6 '09 at 21:31
i am getting child pid 2652 exit signal Segmentation fault (11) in apache log –  pmarreddy Oct 6 '09 at 21:48
the query is working fine in phpmyadmin –  pmarreddy Oct 6 '09 at 21:48
add comment

You might want to try the Batch API

It might be helpful to use the drupal_tweaks module; it allows you to set php execution time limit, as well as mysql default_wait limit.

share|improve this answer
add comment

Your Answer


