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 databa
Opps, last messages had the definition of $originalMessage in the wrong
place. Try this:
If ($button != "")
{
$t = mysql_query("SELECT * from AddExisting");
$number_of_customers = mysql_num_rows($t);
$originalMessage = $message;
for($i
Try this:
If ($button != "")
{
$t = mysql_query("SELECT * from AddExisting");
$number_of_customers = mysql_num_rows($t);
for($i=0; $i<$number_of_customers;$i++)
{
$r = mysql_fetch_array($t);
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...
>work.
>
>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?
>
>
>&g
> work.
>
> 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 Ty
this PHP SHOULD
work.
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 s
t;
>Shouldn't the ID's be further apart than that? Know what I'm saying?
>
>Tyler
>
>- Original Message -
>From: "Martin Towell" <[EMAIL PROTECTED]>
>To: "'Tyler Longren'" <[EMAIL PROTECTED]>; "Jack Dempsey"
>&
r 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:
>
>
bers then adding it back on
later
Martin 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
x27;passcodes' field.
Oh well, 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: [
loop problem?
Exact code:
".mysql_error()."";
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
Exact code:
".mysql_error()."";
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 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 that
Sent: Monday, November 12, 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
e-
From: Tyler 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
I HAVE 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, 200
My word why all the quotes?
".mysql_error()."";
exit;
}
}
mysql_close($connection);
?>
That should give you some better results.
On Monday 12 November 2001 07:32 pm, you wrote:
> Hello everyone,
>
> I have a pretty big list of codes that need to be put into a mysql db. The
> numbers range
try removing the quotes and see if that works
eg
$value1 = "100";
becomes
$value1 = 100;
and
for($i="$value1"; $i<="$value2"; $i++) {
becomes
for($i=$value1; $i<=$value2; $i++) {
Martin T
-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 1
19 matches
Mail list logo