can some tell why the below loop stop running after some time.
$start=10;
const run=0;
while($start run){
//do somthing
}
--
Best Wishes
Andrew Williams
On Fri, 2009-03-27 at 08:11 +, Andrew Williams wrote:
can some tell why the below loop stop running after some time.
$start=10;
const run=0;
while($start run){
//do somthing
}
max_execution_time
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
-Original Message-
From: Andrew Williams [mailto:andrew4willi...@gmail.com]
Sent: 27 March 2009 10:12 AM
To: PHP LIST
Subject: [PHP] WHILE LOOP PROBLEM
can some tell why the below loop stop running after some time.
$start=10;
const run=0;
while($start run){
//do somthing
I have a problem with a piece of code that uses the mail function in a for loop. It
sends out mail to all the users in the database but it has a problem with attaching
their specific name into the message. What happens is the first user in the database
will get their name in the e-mail (Dear
: Wednesday, March 20, 2002 2:07 PM
Subject: [PHP] for loop problem
I have a problem with a piece of code that uses the mail function in a for
loop. It sends out mail to all the users in the database but it has a
problem with attaching their specific name into the message. What happens
*
- Original Message -
From: Kris Vose [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 20, 2002 2:07 PM
Subject: [PHP] for loop problem
I have a problem with a piece of code that uses the mail function in a for
loop. It sends out mail to all the users in the database but it has
On Wed, 20 Mar 2002, Kris Vose wrote:
I have a problem with a piece of code that uses the mail function in a
for loop. It sends out mail to all the users in the database but it has
a problem with attaching their specific name into the message. What
happens is the first user in the database
[EMAIL PROTECTED]
Sent: Monday, November 12, 2001 3:33 PM
Subject: Re: [PHP] for loop problem?
Hi Tyler,
This doesn't sound like a problem with PHP, but MySQL. Can you show
your CREATE TABLE and MySQL version?
John
Hi Martin,
I just got done doing that, and i got the same thing
Tyler Longren wrote:
Here's something interesting though. There's an id field that's set to
AUTO_INCREMENT.
Yep, and that's one thing I've been looking at. See, I find it strange
that you need an KEY idpass (id, passcode(245)) when the ID is
quaranteed to be unique in itself.
Funny...
Hello everyone,
I have a pretty big list of codes that need to be put into a mysql db. The
numbers range from 100 to 1223109. Here's the PHP I wrote to put these
codes into a database:
?
$connection = mysql_connect(blah,blah,blah);
$db = mysql_select_db(db_to_use, $connection);
$value1 =
2:33 PM
To: PHP-General
Subject: [PHP] for loop problem?
Hello everyone,
I have a pretty big list of codes that need to be put into a mysql db. The
numbers range from 100 to 1223109. Here's the PHP I wrote to put these
codes into a database:
?
$connection = mysql_connect(blah,blah,blah
My word why all the quotes?
?
$connection = mysql_connect(blah,blah,blah);
$db = mysql_select_db(db_to_use, $connection);
$value1 = 100;
$value2 = 1223109;
for($i=$value1; $i=$value2; $i++) {
mysql_query(INSERT INTO passcodes (passcode) VALUES ('P$i'));
if (mysql_error() != ) {
print
to, I'll do this in PERL,
but would much rather do it in PHP.
Thanks everyone,
Tyler
- Original Message -
From: Evan Nemerson [EMAIL PROTECTED]
To: Tyler Longren [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, November 12, 2001 9:41 PM
Subject: Re: [PHP] for loop problem?
My word why all
Longren [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 2:53 PM
To: Evan Nemerson; [EMAIL PROTECTED]
Subject: Re: [PHP] for loop problem?
To everyone that said it had something to do with the quotes:
that has nothing to do with it.
When I first wrote this, It didn't have all the quotes
, 2001 10:06 PM
Subject: RE: [PHP] for loop problem?
hmmm... I just tried :
$value1 = 100;
$value2 = 1223109;
for($i = $value1; $i = $value2; $i++)
{
echo $i\n;
}
and it spat out all 223109 numbers (albiet after a VERY long time)
can't see how adding mysql code would affect the loop
paste the complete code in and myself and others can run your exact copy
-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 12, 2001 11:22 PM
To: Martin Towell; [EMAIL PROTECTED]
Subject: Re: [PHP] for loop problem?
I removed all of the quotes
face=Arial size=2.mysql_error()./font;
exit;
}
}
mysql_close($connection);
?
Tyler
- Original Message -
From: Jack Dempsey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 12, 2001 10:34 PM
Subject: RE: [PHP] for loop problem?
paste the complete code in and myself
() != ) {
print font face=Arial size=2.mysql_error()./font;
exit;
}
}
mysql_close($connection);
?
Tyler
- Original Message -
From: Jack Dempsey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 12, 2001 10:34 PM
Subject: RE: [PHP] for loop problem?
paste the complete code
, here I come perl!
Thanks,
Tyler
- Original Message -
From: Jack Dempsey [EMAIL PROTECTED]
To: Tyler Longren [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, November 12, 2001 10:43 PM
Subject: RE: [PHP] for loop problem?
ran it (without mysql queries) and worked finereal strange
T
-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 3:38 PM
To: Jack Dempsey
Cc: PHP-General
Subject: Re: [PHP] for loop problem?
I've ran it a few times without the MySQL code in there. Runs just fine
that way for me too. After it's run
PROTECTED]
Sent: Monday, November 12, 2001 10:45 PM
Subject: RE: [PHP] for loop problem?
How about changing the logic lightly? try this:
$value1 = 0;
$value2 = 223109;
for($i=$value1; $i=$value2; $i++) {
$tmp = sprintf(1%06d\n, $i);
mysql_query(INSERT INTO passcodes (passcode) VALUES ('P
: Martin Towell [EMAIL PROTECTED]
To: 'Tyler Longren' [EMAIL PROTECTED]; Jack Dempsey
[EMAIL PROTECTED]
Cc: PHP-General [EMAIL PROTECTED]
Sent: Monday, November 12, 2001 10:45 PM
Subject: RE: [PHP] for loop problem?
How about changing the logic lightly? try this:
$value1 = 0;
$value2 = 223109
.
Tyler
- Original Message -
From: John Steele [EMAIL PROTECTED]
To: PHP General List [EMAIL PROTECTED]
Sent: Monday, November 12, 2001 3:33 PM
Subject: Re: [PHP] for loop problem?
Hi Tyler,
This doesn't sound like a problem with PHP, but MySQL. Can you show
your CREATE TABLE and MySQL
]
To: PHP General List [EMAIL PROTECTED]
Sent: Monday, November 12, 2001 3:33 PM
Subject: Re: [PHP] for loop problem?
Hi Tyler,
This doesn't sound like a problem with PHP, but MySQL. Can you show
your CREATE TABLE and MySQL version?
John
Hi Martin,
I just got done doing
HI,
my bigest problem in the last two weeks is that I can't figure this out:
- I ' m running a script which contains an infinite loop, and displays
something from time to time, with flush() method.
- this script seems to be working with one IE window openned.
- I open a new window (CTRL + N)
and
25 matches
Mail list logo