php-db | 2000121
Date: 12/02/00
- Next message: Toby Butzon: "Re: [PHP-DB] dead loop"
- Previous message: Pascal Jolin: "Re: [PHP-DB] Question!!! Help me~~~~~~"
- Next in thread: Toby Butzon: "Re: [PHP-DB] dead loop"
- Reply: Toby Butzon: "Re: [PHP-DB] dead loop"
- Reply: Meir Kriheli - MKsoft: "Re: [PHP-DB] dead loop"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello, I'm Teddy. I write a program file like belo using PHP
<?php
require 'functions.php';
$link = mssql_connect($DB_SERVER,$DB_LOGIN,$DB_PASSWORD);
if(!$link) {
DisplayErr("Can not connect to the DB");
exit();
}
$SEC_DB = mssql_select_db($DB,$link);
if(!$SEC_DB) {
DisplayErr("Can not select the DB");
exit();
}
$result = mssql_query("SELECT Q_ID FROM Quiz_Content WHERE Subject_ID = 2",$link);
if(!$result) {
DisplayErr("Can not execute the statement");
exit();
}
$max = mssql_num_rows($result);
echo $max;
$ran_s[] = 0;
while($row = mssql_fetch_array($result)) {
$ran_s[] = $row["Q_ID"];
}
reset($ran_S);
for($i=1;$i<=$max;$i++) {
echo $ran_s[$i];
echo "<BR>";
}
?>
I was using WindowNT4.0 as the web server and Microsoft SQL2000. They both install in the same machine(PII 400 with 128MB RAM).
Every time I execute the program. It just use up almost all the resource in the NT. When I see the TaskManager. PHP is using 99% resource.
I had ever try another methord to output the result. The problem may occur in the last For loop. It just display some number very big. I had attach the script of the table.
Please help me!
Thanks a lot
Teddy
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Toby Butzon: "Re: [PHP-DB] dead loop"
- Previous message: Pascal Jolin: "Re: [PHP-DB] Question!!! Help me~~~~~~"
- Next in thread: Toby Butzon: "Re: [PHP-DB] dead loop"
- Reply: Toby Butzon: "Re: [PHP-DB] dead loop"
- Reply: Meir Kriheli - MKsoft: "Re: [PHP-DB] dead loop"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

