Connecting Tech Pros Worldwide Forums | Help | Site Map

Don't get all records from SQL-table

LK
Guest
 
Posts: n/a
#1: Sep 24 '07
Hi!

Following script stops after a while (appr. 1 minute) without an error-
message:

// Loop 12 Times:
$conn=odbc_connect("database1","","");
$sql="SELECT * FROM Table1 WHERE id>0";
$result = odbc_exec($conn, $sql);
$i=1;
while (odbc_fetch_row($result, $i)){
// --- Creating table for display ---
$i++;
};

With reading 3000 records, looping 12 times. With the loop ~ 1 to 3
times the script works.

Is there any timeout-problem (session- and script-timeout are set to
1000)?

Regards
LK


The Natural Philosopher
Guest
 
Posts: n/a
#2: Sep 24 '07

re: Don't get all records from SQL-table


LK wrote:
Quote:
Hi!
>
Following script stops after a while (appr. 1 minute) without an error-
message:
>
// Loop 12 Times:
$conn=odbc_connect("database1","","");
$sql="SELECT * FROM Table1 WHERE id>0";
$result = odbc_exec($conn, $sql);
$i=1;
while (odbc_fetch_row($result, $i)){
// --- Creating table for display ---
$i++;
};
>
With reading 3000 records, looping 12 times. With the loop ~ 1 to 3
times the script works.
>
Is there any timeout-problem (session- and script-timeout are set to
1000)?
>
Regards
LK
>
A wild guess: Runs out of memory somewhere..

LK
Guest
 
Posts: n/a
#3: Sep 24 '07

re: Don't get all records from SQL-table


Thanks!

Error found: max_execution_time in php.ini was to short.



On 24 Sep., 10:11, LK <ludwig.konval...@chello.atwrote:
Quote:
Hi!
>
Following script stops after a while (appr. 1 minute) without an error-
message:
>
// Loop 12 Times:
$conn=odbc_connect("database1","","");
$sql="SELECT * FROM Table1 WHERE id>0";
$result = odbc_exec($conn, $sql);
$i=1;
while (odbc_fetch_row($result, $i)){
// --- Creating table for display ---
$i++;
};
>
With reading 3000 records, looping 12 times. With the loop ~ 1 to 3
times the script works.
>
Is there any timeout-problem (session- and script-timeout are set to
1000)?
>
Regards
LK

Closed Thread