I am running Links SQL 2.12.
I wrote a small script. Some codes as follows:
my $db = $DB->table('Quiz');
for ($i=1; $i<=40; $i++) {
$sth = $db->get($i);
if ($sth) {... }
else {... }
....
}
The first column of table('Quiz') is ID, from 1 to 40.
Everything worked fine until I set debug_level to 1. It kept running but didn't do anything and no error message. When I set debug_level back to 0, it worked again. Then I changed $i. If I set $i<=16, it worked. If I set $i<=17, it didn't work. I checked all the records of the table, there was nothing wrong. At last, I found that ($i=20; $i<=36; $i++) will work. But ($i=20; $i<=37; $i++) won't work.
It means it can't loop for over 16 times when I set debug_level to 1. Why this happens?
Any help is greatly appreciated.
I wrote a small script. Some codes as follows:
my $db = $DB->table('Quiz');
for ($i=1; $i<=40; $i++) {
$sth = $db->get($i);
if ($sth) {... }
else {... }
....
}
The first column of table('Quiz') is ID, from 1 to 40.
Everything worked fine until I set debug_level to 1. It kept running but didn't do anything and no error message. When I set debug_level back to 0, it worked again. Then I changed $i. If I set $i<=16, it worked. If I set $i<=17, it didn't work. I checked all the records of the table, there was nothing wrong. At last, I found that ($i=20; $i<=36; $i++) will work. But ($i=20; $i<=37; $i++) won't work.
It means it can't loop for over 16 times when I set debug_level to 1. Why this happens?
Any help is greatly appreciated.