[PHP-DB] UPDATE table1 FROM table2

2001-11-02 Thread m0sh3

In MySQL 3.23, how to update one table using information from another table.

update table1 set value1=t2.value2
from table1 as t inner join table2 as t1 using(pk_key) ???

or

update table1 as t1 inner join table2 as t2 using(pk_key)
set t1.value1=t2.value2 ???

Is it possible at all?

Thank you



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] sending bulk emails

2001-11-02 Thread Cami

Hi guys,
Does anybody know how to send bulk emails using php?
Thanks,
Cami

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] UPDATE table1 FROM table2

2001-11-02 Thread Niklas Lampén

Yes, it is possible:

UPDATE TABLE2 SET (Field1, Field2, Field3)
SELECT UpdaterField1, UpdaterField2, UpdaterField3 FROM TABLE1
WHERE SomeField LIKE 'Something'
WHERE SomeField LIKE 'Something'


That should work. Manual tells you more in Update section.


Niklas

-Original Message-
From: m0sh3 [mailto:[EMAIL PROTECTED]] 
Sent: 2. marraskuuta 2001 13:15
To: [EMAIL PROTECTED]
Subject: [PHP-DB] UPDATE table1 FROM table2


In MySQL 3.23, how to update one table using information from another
table.

update table1 set value1=t2.value2
from table1 as t inner join table2 as t1 using(pk_key) ???

or

update table1 as t1 inner join table2 as t2 using(pk_key)
set t1.value1=t2.value2 ???

Is it possible at all?

Thank you



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] UPDATE table1 FROM table2

2001-11-02 Thread Niklas Lampén

Uups!

Sorry, That won't work. Do it like this:

REPLACE INTO test2 (test2.ID, test2.Value)
SELECT test1.ID, test1.Value FROM test1 WHERE test1.ID LIKE '1'

From manual:
...REPLACE works exactly like INSERT, except that if an old record in
the table has the same
value as a new record on a unique index, the old record is deleted
before the new record is
inserted


Niklas

-Original Message-
From: m0sh3 [mailto:[EMAIL PROTECTED]] 
Sent: 2. marraskuuta 2001 13:37
To: Niklas Lampén
Subject: Re: [PHP-DB] UPDATE table1 FROM table2


thanx for reply
but in manual there's nothing said about this form of UPDATE, just plain
one.

your way: how do i link fields between updated table and source table?
thanx


- Original Message -
From: Niklas Lampén [EMAIL PROTECTED]
To: 'm0sh3' [EMAIL PROTECTED]
Sent: Friday, November 02, 2001 3:27 AM
Subject: RE: [PHP-DB] UPDATE table1 FROM table2


 Yes, it is possible:

 UPDATE TABLE2 SET (Field1, Field2, Field3)
 SELECT UpdaterField1, UpdaterField2, UpdaterField3 FROM TABLE1 WHERE 
 SomeField LIKE 'Something' WHERE SomeField LIKE 'Something'


 That should work. Manual tells you more in Update section.


 Niklas

 -Original Message-
 From: m0sh3 [mailto:[EMAIL PROTECTED]]
 Sent: 2. marraskuuta 2001 13:15
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] UPDATE table1 FROM table2


 In MySQL 3.23, how to update one table using information from another 
 table.

 update table1 set value1=t2.value2
 from table1 as t inner join table2 as t1 using(pk_key) ???

 or

 update table1 as t1 inner join table2 as t2 using(pk_key)
 set t1.value1=t2.value2 ???

 Is it possible at all?

 Thank you



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: 
 [EMAIL PROTECTED]




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] sending bulk emails

2001-11-02 Thread Russ Michell

 Does anybody know how to send bulk emails using php?
Don't do it!!

But of you must - I guess you could build an array containing email addresses, names, 
etc - taken 
from form input or a database or whatever and then loop the arrays mailing people...

$mail = mail(;
for($i=0; $i$email_array_name;$i++( {
$mail .= $values,;
}
$mail .= \$subject\,\$body\,\From: $from\);;

Something like that anyway (that's just off the top of my head)
Regards.

Russ

On Fri, 2 Nov 2001 11:26:22 - Cami [EMAIL PROTECTED] wrote:

 Hi guys,
 Does anybody know how to send bulk emails using php?
 Thanks,
 Cami
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

#---#

  Believe nothing - consider everything   
  
  Russ Michell
  Anglia Polytechnic University Webteam
  Room 1C 'The Eastings' East Road, Cambridge
  
  e: [EMAIL PROTECTED]
  w: www.apu.ac.uk/webteam

  www.theruss.com

#---#


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] sending bulk emails

2001-11-02 Thread Rick Emery

Opswe've just armed a potential spammer...

-Original Message-
From: Russ Michell [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 6:20 AM
To: Cami
Cc: PHP DB list
Subject: Re: [PHP-DB] sending bulk emails


 Does anybody know how to send bulk emails using php?
Don't do it!!

But of you must - I guess you could build an array containing email
addresses, names, etc - taken 
from form input or a database or whatever and then loop the arrays mailing
people...

$mail = mail(;
for($i=0; $i$email_array_name;$i++( {
$mail .= $values,;
}
$mail .= \$subject\,\$body\,\From: $from\);;

Something like that anyway (that's just off the top of my head)
Regards.

Russ

On Fri, 2 Nov 2001 11:26:22 - Cami [EMAIL PROTECTED] wrote:

 Hi guys,
 Does anybody know how to send bulk emails using php?
 Thanks,
 Cami
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

#---#

  Believe nothing - consider everything   
  
  Russ Michell
  Anglia Polytechnic University Webteam
  Room 1C 'The Eastings' East Road, Cambridge
  
  e: [EMAIL PROTECTED]
  w: www.apu.ac.uk/webteam

  www.theruss.com

#---#


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: RE: [PHP-DB] sending bulk emails

2001-11-02 Thread Russ Michell

Hmmm this is true - but as someone once wrote on this list:

If someone want's to build a car with 4 reverse gears, we can tell them it's not a 
very good idea, 
but we can also show them how to do it.

Granted though - spam is a little different than cars!
Cheers.

Russ
On Fri, 2 Nov 2001 07:26:15 -0600  Rick Emery [EMAIL PROTECTED] wrote:

 Opswe've just armed a potential spammer...
 
 -Original Message-
 From: Russ Michell [mailto:[EMAIL PROTECTED]]
 Sent: Friday, November 02, 2001 6:20 AM
 To: Cami
 Cc: PHP DB list
 Subject: Re: [PHP-DB] sending bulk emails
 
 
  Does anybody know how to send bulk emails using php?
 Don't do it!!
 
 But of you must - I guess you could build an array containing email
 addresses, names, etc - taken 
 from form input or a database or whatever and then loop the arrays mailing
 people...
 
 $mail = mail(;
 for($i=0; $i$email_array_name;$i++( {
   $mail .= $values,;
   }
 $mail .= \$subject\,\$body\,\From: $from\);;
 
 Something like that anyway (that's just off the top of my head)
 Regards.
 
 Russ
   
 On Fri, 2 Nov 2001 11:26:22 - Cami [EMAIL PROTECTED] wrote:
 
  Hi guys,
  Does anybody know how to send bulk emails using php?
  Thanks,
  Cami
  
  -- 
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
 
 #---#
   
   Believe nothing - consider everything 
   
   Russ Michell
   Anglia Polytechnic University Webteam
   Room 1C 'The Eastings' East Road, Cambridge
   
   e: [EMAIL PROTECTED]
   w: www.apu.ac.uk/webteam
 
   www.theruss.com
   
 #---#
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

#---#

  Believe nothing - consider everything   
  
  Russ Michell
  Anglia Polytechnic University Webteam
  Room 1C 'The Eastings' East Road, Cambridge
  
  e: [EMAIL PROTECTED]
  w: www.apu.ac.uk/webteam

  www.theruss.com

#---#


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: RE: [PHP-DB] sending bulk emails

2001-11-02 Thread Rick Emery

GRIN
True...so very true...

A little knowledge is a dangerous thing.  In the hands of a spammer...a
deadly thing...
/GRIN

-Original Message-
From: Russ Michell [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 7:34 AM
To: Rick Emery
Cc: PHP DB list
Subject: Re: RE: [PHP-DB] sending bulk emails


Hmmm this is true - but as someone once wrote on this list:

If someone want's to build a car with 4 reverse gears, we can tell them
it's not a very good idea, 
but we can also show them how to do it.

Granted though - spam is a little different than cars!
Cheers.

Russ
On Fri, 2 Nov 2001 07:26:15 -0600  Rick Emery [EMAIL PROTECTED] wrote:

 Opswe've just armed a potential spammer...
 
 -Original Message-
 From: Russ Michell [mailto:[EMAIL PROTECTED]]
 Sent: Friday, November 02, 2001 6:20 AM
 To: Cami
 Cc: PHP DB list
 Subject: Re: [PHP-DB] sending bulk emails
 
 
  Does anybody know how to send bulk emails using php?
 Don't do it!!
 
 But of you must - I guess you could build an array containing email
 addresses, names, etc - taken 
 from form input or a database or whatever and then loop the arrays mailing
 people...
 
 $mail = mail(;
 for($i=0; $i$email_array_name;$i++( {
   $mail .= $values,;
   }
 $mail .= \$subject\,\$body\,\From: $from\);;
 
 Something like that anyway (that's just off the top of my head)
 Regards.
 
 Russ
   
 On Fri, 2 Nov 2001 11:26:22 - Cami [EMAIL PROTECTED] wrote:
 
  Hi guys,
  Does anybody know how to send bulk emails using php?
  Thanks,
  Cami
  
  -- 
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
 
 #---#
   
   Believe nothing - consider everything 
   
   Russ Michell
   Anglia Polytechnic University Webteam
   Room 1C 'The Eastings' East Road, Cambridge
   
   e: [EMAIL PROTECTED]
   w: www.apu.ac.uk/webteam
 
   www.theruss.com
   
 #---#
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

#---#

  Believe nothing - consider everything   
  
  Russ Michell
  Anglia Polytechnic University Webteam
  Room 1C 'The Eastings' East Road, Cambridge
  
  e: [EMAIL PROTECTED]
  w: www.apu.ac.uk/webteam

  www.theruss.com

#---#



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




SV: RE: [PHP-DB] sending bulk emails

2001-11-02 Thread Trond Erling Hundal

I say. Help those who want to be helped. Or else, don't bother.
And if they complain, format their harddrive.
eh...

Come on guys.. don't you remember the first time you made a
spam-script/newsletter-script??
...the feeling you felt when all those mail streamed out of the server...
it IS special.
Don't ruin this poor guy's experience.

 -Opprinnelig melding-
 Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Pa vegne av Russ
 Michell
 Sendt: 2. november 2001 14:34
 Til: Rick Emery
 Kopi: PHP DB list
 Emne: Re: RE: [PHP-DB] sending bulk emails


 Hmmm this is true - but as someone once wrote on this list:

 If someone want's to build a car with 4 reverse gears, we can
 tell them it's not a very good idea,
 but we can also show them how to do it.

 Granted though - spam is a little different than cars!
 Cheers.

 Russ
 On Fri, 2 Nov 2001 07:26:15 -0600  Rick Emery [EMAIL PROTECTED] wrote:

  Opswe've just armed a potential spammer...
 
  -Original Message-
  From: Russ Michell [mailto:[EMAIL PROTECTED]]
  Sent: Friday, November 02, 2001 6:20 AM
  To: Cami
  Cc: PHP DB list
  Subject: Re: [PHP-DB] sending bulk emails
 
 
   Does anybody know how to send bulk emails using php?
  Don't do it!!
 
  But of you must - I guess you could build an array containing email
  addresses, names, etc - taken
  from form input or a database or whatever and then loop the
 arrays mailing
  people...
 
  $mail = mail(;
  for($i=0; $i$email_array_name;$i++( {
  $mail .= $values,;
  }
  $mail .= \$subject\,\$body\,\From: $from\);;
 
  Something like that anyway (that's just off the top of my head)
  Regards.
 
  Russ
 
  On Fri, 2 Nov 2001 11:26:22 - Cami [EMAIL PROTECTED] wrote:
 
   Hi guys,
   Does anybody know how to send bulk emails using php?
   Thanks,
   Cami
  
   --
   PHP Database Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
  
 
  #---#
 
Believe nothing - consider everything
 
Russ Michell
Anglia Polytechnic University Webteam
Room 1C 'The Eastings' East Road, Cambridge
 
e: [EMAIL PROTECTED]
w: www.apu.ac.uk/webteam
 
www.theruss.com
 
  #---#
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

 #---#

   Believe nothing - consider everything

   Russ Michell
   Anglia Polytechnic University Webteam
   Room 1C 'The Eastings' East Road, Cambridge

   e: [EMAIL PROTECTED]
   w: www.apu.ac.uk/webteam

   www.theruss.com

 #---#


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] php-mysql-and the elusive eval statement....

2001-11-02 Thread Rick Emery

That which is in an evel() must be valid PHP code.  ? is not PHP, rather
it terminates a PHP segment.

What ARE you trying to execute?  I've used eval() with arguments extracted
from a mySQL database many times with success.

-Original Message-
From: Richard A. Noordam [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 01, 2001 4:06 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] php-mysql-and the elusive eval statement


I'm having a php/mysql problem using the eval statement.  what I'm done is
created a template that is database driven
ie.  the document is setup so that all of the head, leftside, body, right
and bottom are all text comming from database query returns.

all database returns are valid tested code.  all peices have been tested in
their own pages and shown to work.

inside the text of the returns supposedly can be php code.  using the eval
statment i can get the html code to return no problem(page works correctly).
when the code has php code in it it doesn't seem to work.

using the eval statement I should be able to do something like

eval (?$string) and it should evaluate the the code within thus when it
comes to a ?php string it'll evaluate the next bit as php code. (right?)

somehow it doesn't.
here's a small snipit of the code.

?php
// **
// Header of Document
// **
eval (?$top);
?
center
/td
/tr
/table
/div
div name=middle
table width=780 border=0 cellpadding=0 cellspacing=0
tr
td width=120 bgcolor=?php echo $leftcolor;? border=0
div name=leftbar

the inside code just goes out and grabs a counter value, updates it +1 and
returns the original counter val.

I get nothing(well I get a space, where somehthing is suppose to be
returned).   the code inside works also as independently in a page by itself
it'll return valid counter information and does the update.

I'm about ready to pull my hair out, (good thing my wife keeps it about 1/2
inch long, heh heh).  tie all of my computers together with a big rope and
use them as boat anchors.  (I don't even have a boat, so I'll just have
to throw them in)

so any help avoiding this costly situation would be appreciated  thanks
in advance


R
---
Never, Never buy beer!  Make it!  It tastes better!!

Woke up this mornin' an' I had myself a beer.
Yea, Ah woke up this mornin' an' I had myself a beer.
The futures' uncertain and the end is always near.
-Jim Morrison, Roadhouse Blues

Fill with mingled cream  and amber,
I will drain that glass again.
Such hilarious visions  clamber
Through the chambers of my brain.
Quaintest thoughts--queerest  fancies,
Come to life and fade away:
I am drinking ale  today.
--Edgar Allan Poe




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: RE: [PHP-DB] sending bulk emails

2001-11-02 Thread Rick Emery

Actually, I've been tempted to do that.  Never done it, though.  But I would
agree with you.
The sense of power would be...euphoric

-Original Message-
From: Trond Erling Hundal [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 7:36 AM
To: [EMAIL PROTECTED]; Rick Emery
Cc: PHP DB list
Subject: SV: RE: [PHP-DB] sending bulk emails


I say. Help those who want to be helped. Or else, don't bother.
And if they complain, format their harddrive.
eh...

Come on guys.. don't you remember the first time you made a
spam-script/newsletter-script??
...the feeling you felt when all those mail streamed out of the server...
it IS special.
Don't ruin this poor guy's experience.

 -Opprinnelig melding-
 Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Pa vegne av Russ
 Michell
 Sendt: 2. november 2001 14:34
 Til: Rick Emery
 Kopi: PHP DB list
 Emne: Re: RE: [PHP-DB] sending bulk emails


 Hmmm this is true - but as someone once wrote on this list:

 If someone want's to build a car with 4 reverse gears, we can
 tell them it's not a very good idea,
 but we can also show them how to do it.

 Granted though - spam is a little different than cars!
 Cheers.

 Russ
 On Fri, 2 Nov 2001 07:26:15 -0600  Rick Emery [EMAIL PROTECTED] wrote:

  Opswe've just armed a potential spammer...
 
  -Original Message-
  From: Russ Michell [mailto:[EMAIL PROTECTED]]
  Sent: Friday, November 02, 2001 6:20 AM
  To: Cami
  Cc: PHP DB list
  Subject: Re: [PHP-DB] sending bulk emails
 
 
   Does anybody know how to send bulk emails using php?
  Don't do it!!
 
  But of you must - I guess you could build an array containing email
  addresses, names, etc - taken
  from form input or a database or whatever and then loop the
 arrays mailing
  people...
 
  $mail = mail(;
  for($i=0; $i$email_array_name;$i++( {
  $mail .= $values,;
  }
  $mail .= \$subject\,\$body\,\From: $from\);;
 
  Something like that anyway (that's just off the top of my head)
  Regards.
 
  Russ
 
  On Fri, 2 Nov 2001 11:26:22 - Cami [EMAIL PROTECTED] wrote:
 
   Hi guys,
   Does anybody know how to send bulk emails using php?
   Thanks,
   Cami
  
   --
   PHP Database Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
  
 
  #---#
 
Believe nothing - consider everything
 
Russ Michell
Anglia Polytechnic University Webteam
Room 1C 'The Eastings' East Road, Cambridge
 
e: [EMAIL PROTECTED]
w: www.apu.ac.uk/webteam
 
www.theruss.com
 
  #---#
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

 #---#

   Believe nothing - consider everything

   Russ Michell
   Anglia Polytechnic University Webteam
   Room 1C 'The Eastings' East Road, Cambridge

   e: [EMAIL PROTECTED]
   w: www.apu.ac.uk/webteam

   www.theruss.com

 #---#


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] sending bulk emails

2001-11-02 Thread Jason G.

I just encountered the same problem...

I made a MySQL table with an email_id, email, and sentdate field.

while(true)
{
   set_time_limit(10); //Give script 10 more seconds to run

   SELECT email_id, email FROM thelist WHERE sentdate=0 LIMIT 1

   if record not found, then break;

   then I use the mail function to send it

   UPDATE thelist SET sentdate=UNIX_TIMESTAMP() WHERE email_id=$email_id

   then I use the sleep() or usleep() function to wait a second or so (so I 
do not use too much bandwidth)

}

-Jason Garber
IonZoft.com


At 07:26 AM 11/2/2001 -0600, Rick Emery wrote:
Opswe've just armed a potential spammer...

-Original Message-
From: Russ Michell [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 6:20 AM
To: Cami
Cc: PHP DB list
Subject: Re: [PHP-DB] sending bulk emails


  Does anybody know how to send bulk emails using php?
Don't do it!!

But of you must - I guess you could build an array containing email
addresses, names, etc - taken
from form input or a database or whatever and then loop the arrays mailing
people...

$mail = mail(;
for($i=0; $i$email_array_name;$i++( {
 $mail .= $values,;
 }
$mail .= \$subject\,\$body\,\From: $from\);;

Something like that anyway (that's just off the top of my head)
Regards.

Russ

On Fri, 2 Nov 2001 11:26:22 - Cami [EMAIL PROTECTED] wrote:

  Hi guys,
  Does anybody know how to send bulk emails using php?
  Thanks,
  Cami
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

#---#

   Believe nothing - consider everything

   Russ Michell
   Anglia Polytechnic University Webteam
   Room 1C 'The Eastings' East Road, Cambridge

   e: [EMAIL PROTECTED]
   w: www.apu.ac.uk/webteam

   www.theruss.com

#---#


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: RE: [PHP-DB] sending bulk emails

2001-11-02 Thread Shane Wright

Hi

If he's going to do it, it should at least be done safely...


- have a status field in your database table (unsent/sent/error)

- update the status field after _every_ email you send.

- do NOT do this in a transaction (otherwise if something dies everything is 
forgotten)

- if the update status query fails, do everything possible to avoid carrying 
on (important if the sending job is in crontab) - this can even be things 
like renaming the database table, deleting itself, anything to make sure it 
doesnt screw up and send any emails that it shouldnt

- dont send too fast.  1000-2000 per hour is good.

- be VERY VERY VERY careful that all the recipients have GIVEN PERMISSION for 
you to email them.  Its not worth the hassle of annoying people or risking 
getting your mail hub blacklisted.


General philosophy: sending too few mails or missing out the odd recipient 
doesnt matter, but NEVER send too many or any duplicates to any person.


Just my 2c

Shane


On Friday 02 November 2001 1:40 pm, Rick Emery wrote:
 GRIN
 True...so very true...

 A little knowledge is a dangerous thing.  In the hands of a spammer...a
 deadly thing...
 /GRIN

 -Original Message-
 From: Russ Michell [mailto:[EMAIL PROTECTED]]
 Sent: Friday, November 02, 2001 7:34 AM
 To: Rick Emery
 Cc: PHP DB list
 Subject: Re: RE: [PHP-DB] sending bulk emails


 Hmmm this is true - but as someone once wrote on this list:

 If someone want's to build a car with 4 reverse gears, we can tell them
 it's not a very good idea,
 but we can also show them how to do it.

 Granted though - spam is a little different than cars!
 Cheers.

 Russ

 On Fri, 2 Nov 2001 07:26:15 -0600  Rick Emery [EMAIL PROTECTED] wrote:
  Opswe've just armed a potential spammer...
 
  -Original Message-
  From: Russ Michell [mailto:[EMAIL PROTECTED]]
  Sent: Friday, November 02, 2001 6:20 AM
  To: Cami
  Cc: PHP DB list
  Subject: Re: [PHP-DB] sending bulk emails
 
   Does anybody know how to send bulk emails using php?
 
  Don't do it!!
 
  But of you must - I guess you could build an array containing email
  addresses, names, etc - taken
  from form input or a database or whatever and then loop the arrays
  mailing people...
 
  $mail = mail(;
  for($i=0; $i$email_array_name;$i++( {
  $mail .= $values,;
  }
  $mail .= \$subject\,\$body\,\From: $from\);;
 
  Something like that anyway (that's just off the top of my head)
  Regards.
 
  Russ
 
  On Fri, 2 Nov 2001 11:26:22 - Cami [EMAIL PROTECTED] wrote:
   Hi guys,
   Does anybody know how to send bulk emails using php?
   Thanks,
   Cami
  
   --
   PHP Database Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
   [EMAIL PROTECTED]
 
  #---#
 
Believe nothing - consider everything
 
Russ Michell
Anglia Polytechnic University Webteam
Room 1C 'The Eastings' East Road, Cambridge
 
e: [EMAIL PROTECTED]
w: www.apu.ac.uk/webteam
 
www.theruss.com
 
  #---#
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]

 #---#

   Believe nothing - consider everything

   Russ Michell
   Anglia Polytechnic University Webteam
   Room 1C 'The Eastings' East Road, Cambridge

   e: [EMAIL PROTECTED]
   w: www.apu.ac.uk/webteam

   www.theruss.com

 #---#

-- 
Shane

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: RE: [PHP-DB] sending bulk emails

2001-11-02 Thread Cami

Oh dear,
Please do not worry. I would never send spam emails. One of my clients for
which I am developing a database want to be able to send his members emails
.  The problem would have been simple if he had a few members but he has
tens of tousands. So with some help from some of you and adopting a send
mail library I think that now is in the process of being sorted. So just to
calm you guys down. I would never do a spam email.
Thank you everybody for your help,
Cami


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] sending bulk emails

2001-11-02 Thread Robert Klinkenberg

Interesting, instead of blocking access to programming tricks because the
company wants to protect its investments (or the government doesn't like us
using it (think PGP)) we are now not telling people how to make good
software because somebody might use it to do something we (or some people)
don't like.

Robert Klinkenberg

-Oorspronkelijk bericht-
Van: Rick Emery [mailto:[EMAIL PROTECTED]]
Verzonden: Friday, November 02, 2001 2:26 PM
Aan: PHP DB list
Onderwerp: RE: [PHP-DB] sending bulk emails


Opswe've just armed a potential spammer...


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] UPDATE table1 FROM table2

2001-11-02 Thread Sheridan Saint-Michel

This is actually one of the more common MySQL problems which doesn't have an
easy answer.

The best I can offer is a bit of a kludge... but it does work.  The trick is
to use the Replace...Select command.  The problem with this is that you can
not select from the table you are replacing.  But if you make a temporary
copy of the tabe you are updating, then what you are wanting to do can be
done with

$query = create temporary table temp select * from table1; replace table1
select temp.id,table2.value2,temp.colname from table2 left join temp
using(id);

You just have to make sure all of the columns in table1 you don't want
changed appear as temp.colname.  The temp table will only exist as long as
the thread does, since it was created with the temporary keyword.

Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.com


- Original Message -
From: m0sh3 [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 02, 2001 5:14 AM
Subject: [PHP-DB] UPDATE table1 FROM table2


 In MySQL 3.23, how to update one table using information from another
table.

 update table1 set value1=t2.value2
 from table1 as t inner join table2 as t1 using(pk_key) ???

 or

 update table1 as t1 inner join table2 as t2 using(pk_key)
 set t1.value1=t2.value2 ???

 Is it possible at all?

 Thank you



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] sending bulk emails

2001-11-02 Thread Rick Emery

my comment was humor.  we've already explored and killed this thread.

-Original Message-
From: Robert Klinkenberg [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 9:44 AM
To: 'Rick Emery'; PHP DB list
Subject: RE: [PHP-DB] sending bulk emails


Interesting, instead of blocking access to programming tricks because the
company wants to protect its investments (or the government doesn't like us
using it (think PGP)) we are now not telling people how to make good
software because somebody might use it to do something we (or some people)
don't like.

Robert Klinkenberg

-Oorspronkelijk bericht-
Van: Rick Emery [mailto:[EMAIL PROTECTED]]
Verzonden: Friday, November 02, 2001 2:26 PM
Aan: PHP DB list
Onderwerp: RE: [PHP-DB] sending bulk emails


Opswe've just armed a potential spammer...



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




SV: [PHP-DB] sending bulk emails

2001-11-02 Thread Trond Erling Hundal

Come on ppl!
You can't seriously say that we have become evil creatures luring idees on
the list..?
come on man!

 -Opprinnelig melding-
 Fra: Rick Emery [mailto:[EMAIL PROTECTED]]
 Sendt: 2. november 2001 17:05
 Til: PHP DB list
 Emne: RE: [PHP-DB] sending bulk emails


 my comment was humor.  we've already explored and killed this thread.

 -Original Message-
 From: Robert Klinkenberg [mailto:[EMAIL PROTECTED]]
 Sent: Friday, November 02, 2001 9:44 AM
 To: 'Rick Emery'; PHP DB list
 Subject: RE: [PHP-DB] sending bulk emails


 Interesting, instead of blocking access to programming tricks because the
 company wants to protect its investments (or the government
 doesn't like us
 using it (think PGP)) we are now not telling people how to make good
 software because somebody might use it to do something we (or some people)
 don't like.

 Robert Klinkenberg

 -Oorspronkelijk bericht-
 Van: Rick Emery [mailto:[EMAIL PROTECTED]]
 Verzonden: Friday, November 02, 2001 2:26 PM
 Aan: PHP DB list
 Onderwerp: RE: [PHP-DB] sending bulk emails


 Opswe've just armed a potential spammer...



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] sending bulk emails

2001-11-02 Thread Jonathan Hilgeman

Interesting that this should come up. The company I work for needs to send
out an e-mail to 95k of their subscribers. Now, this is the first time in 2
years, so you can imagine that we'll be getting 94k of bounced e-mail
addresses. So I'm writing a script that will handle sending out the e-mails
and handling incoming bounced e-mail addresses. In any case, I would think
that my PHP script would time out before sending 95k e-mails. I know it has
timed out at 30 seconds before, but I can't remember if the faulty script
had an endless loop for 30 seconds or if there was any data getting sent or
received in that time. Anyone know beforehand whether I will get a timeout
with sending these e-mails, and if so, how to work around it?

- Jonathan

-Original Message-
From: Russ Michell [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 4:20 AM
To: Cami
Cc: PHP DB list
Subject: Re: [PHP-DB] sending bulk emails


 Does anybody know how to send bulk emails using php?
Don't do it!!

But of you must - I guess you could build an array containing email
addresses, names, etc - taken 
from form input or a database or whatever and then loop the arrays mailing
people...

$mail = mail(;
for($i=0; $i$email_array_name;$i++( {
$mail .= $values,;
}
$mail .= \$subject\,\$body\,\From: $from\);;

Something like that anyway (that's just off the top of my head)
Regards.

Russ

On Fri, 2 Nov 2001 11:26:22 - Cami [EMAIL PROTECTED] wrote:

 Hi guys,
 Does anybody know how to send bulk emails using php?
 Thanks,
 Cami
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

#---#

  Believe nothing - consider everything   
  
  Russ Michell
  Anglia Polytechnic University Webteam
  Room 1C 'The Eastings' East Road, Cambridge
  
  e: [EMAIL PROTECTED]
  w: www.apu.ac.uk/webteam

  www.theruss.com

#---#


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




SV: [PHP-DB] sending bulk emails

2001-11-02 Thread Trond Erling Hundal

Yes, you will get a timeout.
I made a script that wrote a * on the page for each sent mail.
This way your script won't time out, and the sending process looks REALLY
cool.. hehe

Here's a sample snippet:
?
while ($adr = mysql_fetch_array($query_sender)) {
$to = $adr[epost] ;
$postid = $adr[postid] ;

echo *; // Her is the * printed.
flush(); // Flush, to continously update page..



// Sending the mail

$send = mail($to,$subject,$topp\n\n$sak\n\n$bunn,From: Havneavisen
[EMAIL PROTECTED]\nContent-Type: text/plain;
charset=iso-8859-1\nContent-Transfer-Encoding: 8bit\nReply-To: Havneavisen
[EMAIL PROTECTED]\nReturn-Path:
[EMAIL PROTECTED]\nX-Sender:
[EMAIL PROTECTED]\nX-Mailer: PHP\nSender:
[EMAIL PROTECTED]\n) ;


if (!$send) {

   # Legg inn i databasen eller fil! 
   $table = deadmail ;
   $dead_entry = insert into deadmail (id, epost, base) VALUES
(\$postid\,\$to\,\$base_1\) ;
   mysql_query($dead_entry) or die (Could not store the bad mail) ;
   echo Problemer med å sende til $tobr  ;
   continue ;
 }



// Log
   $go_add = INSERT INTO maillogg (epost, dato, type) VALUES (\$to\,
NOW(), \$base_1\) ;
   $add_em = @mysql_query($go_add) ;
   if (!$add_em) {
   echo ERROR could not update:  $to - $go_addbr  ;
   }
} end of while...

?

 -Opprinnelig melding-
 Fra: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]]
 Sendt: 2. november 2001 17:19
 Til: '[EMAIL PROTECTED]'; Cami
 Kopi: PHP DB list
 Emne: RE: [PHP-DB] sending bulk emails


 Interesting that this should come up. The company I work for needs to send
 out an e-mail to 95k of their subscribers. Now, this is the first
 time in 2
 years, so you can imagine that we'll be getting 94k of bounced e-mail
 addresses. So I'm writing a script that will handle sending out
 the e-mails
 and handling incoming bounced e-mail addresses. In any case, I would think
 that my PHP script would time out before sending 95k e-mails. I
 know it has
 timed out at 30 seconds before, but I can't remember if the faulty script
 had an endless loop for 30 seconds or if there was any data
 getting sent or
 received in that time. Anyone know beforehand whether I will get a timeout
 with sending these e-mails, and if so, how to work around it?

 - Jonathan

 -Original Message-
 From: Russ Michell [mailto:[EMAIL PROTECTED]]
 Sent: Friday, November 02, 2001 4:20 AM
 To: Cami
 Cc: PHP DB list
 Subject: Re: [PHP-DB] sending bulk emails


  Does anybody know how to send bulk emails using php?
 Don't do it!!

 But of you must - I guess you could build an array containing email
 addresses, names, etc - taken
 from form input or a database or whatever and then loop the arrays mailing
 people...

 $mail = mail(;
 for($i=0; $i$email_array_name;$i++( {
   $mail .= $values,;
   }
 $mail .= \$subject\,\$body\,\From: $from\);;

 Something like that anyway (that's just off the top of my head)
 Regards.

 Russ

 On Fri, 2 Nov 2001 11:26:22 - Cami [EMAIL PROTECTED] wrote:

  Hi guys,
  Does anybody know how to send bulk emails using php?
  Thanks,
  Cami
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

 #---#

   Believe nothing - consider everything

   Russ Michell
   Anglia Polytechnic University Webteam
   Room 1C 'The Eastings' East Road, Cambridge

   e: [EMAIL PROTECTED]
   w: www.apu.ac.uk/webteam

   www.theruss.com

 #---#


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] sending bulk emails

2001-11-02 Thread Shane Wright

Hi

I find that the best way to do it is with a script having a long/unlimited 
timeout, but limiting it to only a few hundred mails per execution in the SQL 
'... LIMIT 500'.

IMO better this way than a short-timeout script - sending one email can 
sometimes take ages (long DNS lookup, slow connection to the host, etc...)

Shane


On Friday 02 November 2001 4:18 pm, Jonathan Hilgeman wrote:
 Interesting that this should come up. The company I work for needs to send
 out an e-mail to 95k of their subscribers. Now, this is the first time in 2
 years, so you can imagine that we'll be getting 94k of bounced e-mail
 addresses. So I'm writing a script that will handle sending out the e-mails
 and handling incoming bounced e-mail addresses. In any case, I would think
 that my PHP script would time out before sending 95k e-mails. I know it has
 timed out at 30 seconds before, but I can't remember if the faulty script
 had an endless loop for 30 seconds or if there was any data getting sent or
 received in that time. Anyone know beforehand whether I will get a timeout
 with sending these e-mails, and if so, how to work around it?

 - Jonathan

 -Original Message-
 From: Russ Michell [mailto:[EMAIL PROTECTED]]
 Sent: Friday, November 02, 2001 4:20 AM
 To: Cami
 Cc: PHP DB list
 Subject: Re: [PHP-DB] sending bulk emails

  Does anybody know how to send bulk emails using php?

 Don't do it!!

 But of you must - I guess you could build an array containing email
 addresses, names, etc - taken
 from form input or a database or whatever and then loop the arrays mailing
 people...

 $mail = mail(;
 for($i=0; $i$email_array_name;$i++( {
   $mail .= $values,;
   }
 $mail .= \$subject\,\$body\,\From: $from\);;

 Something like that anyway (that's just off the top of my head)
 Regards.

 Russ

 On Fri, 2 Nov 2001 11:26:22 - Cami [EMAIL PROTECTED] wrote:
  Hi guys,
  Does anybody know how to send bulk emails using php?
  Thanks,
  Cami
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]

 #---#

   Believe nothing - consider everything

   Russ Michell
   Anglia Polytechnic University Webteam
   Room 1C 'The Eastings' East Road, Cambridge

   e: [EMAIL PROTECTED]
   w: www.apu.ac.uk/webteam

   www.theruss.com

 #---#

-- 
Shane

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] sending bulk emails - mail() success/failure

2001-11-02 Thread DL Neil

Shane,

You said:

-
 IMO better this way than a short-timeout script - sending one email can
 sometimes take ages (long DNS lookup, slow connection to the host, etc...)
-

The mail() entry in the manual does say that it returns a boolean for send 
success/failure, however none of the
examples make any use of such feedback. Is there a way to work out if something has 
gone wrong with a particular
mail out, what the actual failure was, eg SMTP server down, DNS lookup failed, slow 
connection time-out, etc?
Indeed what will trigger a FALSE return?

Please advise,
=dn



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] sending bulk emails

2001-11-02 Thread Bill Morrow

You should sort the addressees by domain first too, to give the MTA
a chance to opimize your spam delivery.

On Fri, Nov 02, 2001 at 04:44:06PM +, Shane Wright wrote:
 Hi
 
 I find that the best way to do it is with a script having a long/unlimited 
 timeout, but limiting it to only a few hundred mails per execution in the SQL 
 '... LIMIT 500'.
 
 IMO better this way than a short-timeout script - sending one email can 
 sometimes take ages (long DNS lookup, slow connection to the host, etc...)
 
 Shane
 
 
 On Friday 02 November 2001 4:18 pm, Jonathan Hilgeman wrote:
  Interesting that this should come up. The company I work for needs to send
  out an e-mail to 95k of their subscribers. Now, this is the first time in 2
  years, so you can imagine that we'll be getting 94k of bounced e-mail
  addresses. So I'm writing a script that will handle sending out the e-mails
  and handling incoming bounced e-mail addresses. In any case, I would think
  that my PHP script would time out before sending 95k e-mails. I know it has
  timed out at 30 seconds before, but I can't remember if the faulty script
  had an endless loop for 30 seconds or if there was any data getting sent or
  received in that time. Anyone know beforehand whether I will get a timeout
  with sending these e-mails, and if so, how to work around it?
 
  - Jonathan
 
  -Original Message-
  From: Russ Michell [mailto:[EMAIL PROTECTED]]
  Sent: Friday, November 02, 2001 4:20 AM
  To: Cami
  Cc: PHP DB list
  Subject: Re: [PHP-DB] sending bulk emails
 
   Does anybody know how to send bulk emails using php?
 
  Don't do it!!
 
  But of you must - I guess you could build an array containing email
  addresses, names, etc - taken
  from form input or a database or whatever and then loop the arrays mailing
  people...
 
  $mail = mail(;
  for($i=0; $i$email_array_name;$i++( {
  $mail .= $values,;
  }
  $mail .= \$subject\,\$body\,\From: $from\);;
 
  Something like that anyway (that's just off the top of my head)
  Regards.
 
  Russ
 
  On Fri, 2 Nov 2001 11:26:22 - Cami [EMAIL PROTECTED] wrote:
   Hi guys,
   Does anybody know how to send bulk emails using php?
   Thanks,
   Cami
  
   --
   PHP Database Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
  #---#
 
Believe nothing - consider everything
 
Russ Michell
Anglia Polytechnic University Webteam
Room 1C 'The Eastings' East Road, Cambridge
 
e: [EMAIL PROTECTED]
w: www.apu.ac.uk/webteam
 
www.theruss.com
 
  #---#
 
 -- 
 Shane
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

-- 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] losing first row of an array

2001-11-02 Thread Seany

having this code running PHP4.0b2

$result = mysql_query(SELECT clubac.id AS clubacid, clubac.club_id,
clubac.ac_year, clubac.ac_type, club.id
FROM clubac, club WHERE club.id = '$club_id' AND clubac.club_id = club.id);

$row = mysql_fetch_array($result);

if ($row = mysql_fetch_array($result)) {

do {
echo $row[club_id];
echo $row[id];
echo $row[ac_year];
echo $row[ac_type];

} while($row = mysql_fetch_array($result));

} else .blablabla

is there a fundamental miss on my part why the is printing the first or not
even recognising it
if call direct in mysql with the above query it's fine with the results even
if there is 1 row

duh???

Seany



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] losing first row of an array

2001-11-02 Thread Steve Cayford


On Friday, November 2, 2001, at 01:09  PM, Seany wrote:

 having this code running PHP4.0b2

 $result = mysql_query(SELECT clubac.id AS clubacid, clubac.club_id,
 clubac.ac_year, clubac.ac_type, club.id
 FROM clubac, club WHERE club.id = '$club_id' AND clubac.club_id = 
 club.id);

 $row = mysql_fetch_array($result);

Here you've fetched the first row...


 if ($row = mysql_fetch_array($result)) {

...and here you've overwritten it with the second row.
You probably just want: if ($row) { ...


 do {
 echo $row[club_id];
 echo $row[id];
 echo $row[ac_year];
 echo $row[ac_type];

 } while($row = mysql_fetch_array($result));

 } else .blablabla

 is there a fundamental miss on my part why the is printing the first or 
 not
 even recognising it
 if call direct in mysql with the above query it's fine with the results 
 even
 if there is 1 row

 duh???

 Seany



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] losing first row of an array

2001-11-02 Thread Matthew Loff


You are overwriting the first row.

$result = mysql_query(SELECT clubac.id AS clubacid, clubac.club_id,
clubac.ac_year, clubac.ac_type, club.id
FROM clubac, club WHERE club.id = '$club_id' AND clubac.club_id =
club.id);

if(mysql_num_rows()) 
while ($row = mysql_fetch_array($result) 
{
echo $row[club_id];
echo $row[id];
echo $row[ac_year];
echo $row[ac_type];
} 
else .blablabla

...Or...

$result = mysql_query(SELECT clubac.id AS clubacid, clubac.club_id,
clubac.ac_year, clubac.ac_type, club.id
FROM clubac, club WHERE club.id = '$club_id' AND clubac.club_id =
club.id);

$row = mysql_fetch_array($result);

if ($row)
do {
echo $row[club_id];
echo $row[id];
echo $row[ac_year];
echo $row[ac_type];
} while($row = mysql_fetch_array($result));
else .blablabla


-Original Message-
From: Seany [mailto:[EMAIL PROTECTED]] 
Sent: Friday, November 02, 2001 2:09 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] losing first row of an array


having this code running PHP4.0b2

$result = mysql_query(SELECT clubac.id AS clubacid, clubac.club_id,
clubac.ac_year, clubac.ac_type, club.id
FROM clubac, club WHERE club.id = '$club_id' AND clubac.club_id =
club.id);

$row = mysql_fetch_array($result);

if ($row = mysql_fetch_array($result)) {

do {
echo $row[club_id];
echo $row[id];
echo $row[ac_year];
echo $row[ac_type];

} while($row = mysql_fetch_array($result));

} else .blablabla

is there a fundamental miss on my part why the is printing the first or
not
even recognising it
if call direct in mysql with the above query it's fine with the results
even
if there is 1 row

duh???

Seany



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] losing first row of an array

2001-11-02 Thread Seany

nice spot I went blind for a min.lol

is there any to write columns first but still call fields with headers?
as writing in a table would not allow keeping tr tags open
ie.
echocol[1];
echocol[2];

array_flip do the job?
but how?

Sean



Matthew Loff [EMAIL PROTECTED] wrote in message
005c01c163e0$5716ca20$0ce60281@bang">news:005c01c163e0$5716ca20$0ce60281@bang...

 You are overwriting the first row.

 $result = mysql_query(SELECT clubac.id AS clubacid, clubac.club_id,
 clubac.ac_year, clubac.ac_type, club.id
 FROM clubac, club WHERE club.id = '$club_id' AND clubac.club_id =
 club.id);

 if(mysql_num_rows())
 while ($row = mysql_fetch_array($result)
 {
 echo $row[club_id];
 echo $row[id];
 echo $row[ac_year];
 echo $row[ac_type];
 }
 else .blablabla

 ...Or...

 $result = mysql_query(SELECT clubac.id AS clubacid, clubac.club_id,
 clubac.ac_year, clubac.ac_type, club.id
 FROM clubac, club WHERE club.id = '$club_id' AND clubac.club_id =
 club.id);

 $row = mysql_fetch_array($result);

 if ($row)
 do {
 echo $row[club_id];
 echo $row[id];
 echo $row[ac_year];
 echo $row[ac_type];
 } while($row = mysql_fetch_array($result));
 else .blablabla


 -Original Message-
 From: Seany [mailto:[EMAIL PROTECTED]]
 Sent: Friday, November 02, 2001 2:09 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] losing first row of an array


 having this code running PHP4.0b2

 $result = mysql_query(SELECT clubac.id AS clubacid, clubac.club_id,
 clubac.ac_year, clubac.ac_type, club.id
 FROM clubac, club WHERE club.id = '$club_id' AND clubac.club_id =
 club.id);

 $row = mysql_fetch_array($result);

 if ($row = mysql_fetch_array($result)) {

 do {
 echo $row[club_id];
 echo $row[id];
 echo $row[ac_year];
 echo $row[ac_type];

 } while($row = mysql_fetch_array($result));

 } else .blablabla

 is there a fundamental miss on my part why the is printing the first or
 not
 even recognising it
 if call direct in mysql with the above query it's fine with the results
 even
 if there is 1 row

 duh???

 Seany



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] losing first row of an array

2001-11-02 Thread Matthew Loff


I don't quite get what you're asking... Could you be more specific?


-Original Message-
From: Seany [mailto:[EMAIL PROTECTED]] 
Sent: Friday, November 02, 2001 5:48 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] losing first row of an array


nice spot I went blind for a min.lol

is there any to write columns first but still call fields with headers?
as writing in a table would not allow keeping tr tags open
ie.
echocol[1];
echocol[2];

array_flip do the job?
but how?

Sean



Matthew Loff [EMAIL PROTECTED] wrote in message
005c01c163e0$5716ca20$0ce60281@bang">news:005c01c163e0$5716ca20$0ce60281@bang...

 You are overwriting the first row.

 $result = mysql_query(SELECT clubac.id AS clubacid, clubac.club_id,
 clubac.ac_year, clubac.ac_type, club.id
 FROM clubac, club WHERE club.id = '$club_id' AND clubac.club_id =
 club.id);

 if(mysql_num_rows())
 while ($row = mysql_fetch_array($result)
 {
 echo $row[club_id];
 echo $row[id];
 echo $row[ac_year];
 echo $row[ac_type];
 }
 else .blablabla

 ...Or...

 $result = mysql_query(SELECT clubac.id AS clubacid, clubac.club_id,
 clubac.ac_year, clubac.ac_type, club.id
 FROM clubac, club WHERE club.id = '$club_id' AND clubac.club_id =
 club.id);

 $row = mysql_fetch_array($result);

 if ($row)
 do {
 echo $row[club_id];
 echo $row[id];
 echo $row[ac_year];
 echo $row[ac_type];
 } while($row = mysql_fetch_array($result));
 else .blablabla


 -Original Message-
 From: Seany [mailto:[EMAIL PROTECTED]]
 Sent: Friday, November 02, 2001 2:09 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] losing first row of an array


 having this code running PHP4.0b2

 $result = mysql_query(SELECT clubac.id AS clubacid, clubac.club_id,
 clubac.ac_year, clubac.ac_type, club.id
 FROM clubac, club WHERE club.id = '$club_id' AND clubac.club_id =
 club.id);

 $row = mysql_fetch_array($result);

 if ($row = mysql_fetch_array($result)) {

 do {
 echo $row[club_id];
 echo $row[id];
 echo $row[ac_year];
 echo $row[ac_type];

 } while($row = mysql_fetch_array($result));

 } else .blablabla

 is there a fundamental miss on my part why the is printing the first
or
 not
 even recognising it
 if call direct in mysql with the above query it's fine with the
results
 even
 if there is 1 row

 duh???

 Seany



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
[EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] $this-TRAIL = $trail

2001-11-02 Thread olinux

Can someone explain what this is, either in the
context below or just in general. I do not understand
what this statement means?

10  var $TRAIL = array();
129 while ( $row = mysql_fetch_array($results))
130 {
131 $trail = $this-TRAIL;
132 $count = count($trail);
133 $trail[$count] = $row;
134 $this-TRAIL = $trail;
135 $id = $row[CatParent];
136 $this-get_Parents($id);
137 }

sql query is SELECT CatID,CatParent,CatName from
Categories where CatID = $CatID;

Lines excerted from phpHoo article here:
http://www.webreference.com/perl/xhoo/php1/

Thanks,
olinux





__
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] losing first row of an array

2001-11-02 Thread Seany

Nice to see someone else is up!

Most times I print result sets as given

is

inside a

do

echo$row[fieldname]

while loop

but when putting html with it ie. building a table tr td td td td tr
etc...etc.
you have to close rows before starting new cells

data is then shown

fieldname1   fieldname2
data_for_row1 data_for_row1
data_for_row2 data_for_row2

what i would like to do is transpose data so as to write as shown like this

fieldname1  data_for_row1 data_for_row2
fieldname2  data_for_row1 data_for_row2

I think a for while do loop would work with ++ inexing but u lose the field
calling ability

any ideas??

or is it just 12.40am here in the UK

Cheers
Sean


Matthew Loff [EMAIL PROTECTED] wrote in message
006401c163fd$bbb34bd0$0ce60281@bang">news:006401c163fd$bbb34bd0$0ce60281@bang...

 I don't quite get what you're asking... Could you be more specific?


 -Original Message-
 From: Seany [mailto:[EMAIL PROTECTED]]
 Sent: Friday, November 02, 2001 5:48 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] losing first row of an array


 nice spot I went blind for a min.lol

 is there any to write columns first but still call fields with headers?
 as writing in a table would not allow keeping tr tags open
 ie.
 echocol[1];
 echocol[2];

 array_flip do the job?
 but how?

 Sean



 Matthew Loff [EMAIL PROTECTED] wrote in message
 005c01c163e0$5716ca20$0ce60281@bang">news:005c01c163e0$5716ca20$0ce60281@bang...
 
  You are overwriting the first row.
 
  $result = mysql_query(SELECT clubac.id AS clubacid, clubac.club_id,
  clubac.ac_year, clubac.ac_type, club.id
  FROM clubac, club WHERE club.id = '$club_id' AND clubac.club_id =
  club.id);
 
  if(mysql_num_rows())
  while ($row = mysql_fetch_array($result)
  {
  echo $row[club_id];
  echo $row[id];
  echo $row[ac_year];
  echo $row[ac_type];
  }
  else .blablabla
 
  ...Or...
 
  $result = mysql_query(SELECT clubac.id AS clubacid, clubac.club_id,
  clubac.ac_year, clubac.ac_type, club.id
  FROM clubac, club WHERE club.id = '$club_id' AND clubac.club_id =
  club.id);
 
  $row = mysql_fetch_array($result);
 
  if ($row)
  do {
  echo $row[club_id];
  echo $row[id];
  echo $row[ac_year];
  echo $row[ac_type];
  } while($row = mysql_fetch_array($result));
  else .blablabla
 
 
  -Original Message-
  From: Seany [mailto:[EMAIL PROTECTED]]
  Sent: Friday, November 02, 2001 2:09 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP-DB] losing first row of an array
 
 
  having this code running PHP4.0b2
 
  $result = mysql_query(SELECT clubac.id AS clubacid, clubac.club_id,
  clubac.ac_year, clubac.ac_type, club.id
  FROM clubac, club WHERE club.id = '$club_id' AND clubac.club_id =
  club.id);
 
  $row = mysql_fetch_array($result);
 
  if ($row = mysql_fetch_array($result)) {
 
  do {
  echo $row[club_id];
  echo $row[id];
  echo $row[ac_year];
  echo $row[ac_type];
 
  } while($row = mysql_fetch_array($result));
 
  } else .blablabla
 
  is there a fundamental miss on my part why the is printing the first
 or
  not
  even recognising it
  if call direct in mysql with the above query it's fine with the
 results
  even
  if there is 1 row
 
  duh???
 
  Seany
 
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] err:parae error not defined function -----

2001-11-02 Thread banyWilson

I installed mysql  php with redhat 7.1 RPM package , they can work well
respectively .but when I use function
mysql_connect(hostname,user,password)to connect mysql , the err
message shows that , parse err not defined function
mysql_connect().what's up ?help me!



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] PEAR DB

2001-11-02 Thread Martin

Pardon an exceedingly dumb question.
Where do I find documentation on HOW to use the PEAR DB class?
What functions to call and what they do?

Martin S

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Forms error in a catalog by Greenspan Bulger

2001-11-02 Thread Darren

Greetings All!

I am working on making a catalog from the example used in MySQL/PHP 
Databases Applications by Jay Greenspan andBrad Bulger.  I am using 
php3 on the remote unix server.  I had to remain all the php files 
and there references in the documents from .php to .php3.  I am 
editing the code in a simple texteditor.

Here is the problem.  I keep getting a Parse error on line 33.
Question 1) How are you suposed count the lines? What is the exact 
definition of a line?
Question 2) Can anybody tell me where the error is and or how to fix 
it?  Enclosed is the code.

Thanks very much in advance for any help or comments.

Darren

Here Tis...

?php
/*

*** This script from MySQL/PHP Database Applications ***
*** by Jay Greenspan and Brad Bulger ***
***  ***
***   You are free to resuse the material in this***
***   script in any manner you see fit. There is ***
***   no need to ask for permission or provide   ***
***   credit.***

*/

// string start_form ([string action [, array attributes]])

// This function returns an HTML form tag. If the first argument
// is empty, the value of the global Apache variable SCRIPT_NAME
// is used for the 'action' attribute of the form tag. Other
// attributes for the form can be specified in the optional second
// argument; the default method of the form is post.

// The behavior of this function on servers other than Apache is
// not known. It's likely that it will work, as SCRIPT_NAME is
// part of the CGI 1.1 specification.

function start_form ($action=, $atts=)
{
global $SCRIPT_NAME;

if (empty($action)) { $action = $SCRIPT_NAME; }

$attlist = get_attlist($atts,array(method=post));
$output = EOQ
form action=$action $attlist
EOQ;
return $output;
}

// string end_form(void)

// This function returns an HTML /form tag.

function end_form ()
{
$output = EOQ
/form
EOQ;
return $output;
}

// string text_field ([string name [, string value [, int size [, 
int maximum length)

// This function returns an HTML text input field. The default size
// of the field is 10. A value and maximum data length for the field
// may be supplied.

function text_field ($name=, $value=, $size=10, $maxlen=)
{
$maxatt = empty($maxlen) ?  : maxlength=\$maxlen\;
$output = EOQ
input type=text name=$name value=$value size=$size $maxatt
EOQ;
return $output;
}

// string textarea_field([string name [, string value [, int cols [, 
int rows [, string wrap mode])

// This function returns an HTML textarea field. The default size is
// 50 columns and 10 rows, and the default wrap mode is 'soft', 
which means
// no hard newline characters will be inserted after line breaks in what
// the user types into the field. The alternative wrap mode is 'hard',
// which means that hard newlines will be inserted.

function textarea_field ($name=, $value=, $cols=50, $rows=10, 
$wrap=soft)
{
$output = EOQ
textarea name=$name cols=$cols rows=$rows 
wrap=$wrap$value/textarea
EOQ;
return $output;
}

// string password_field ([string name [, string value [, int size 
[, int maximum length)

// This function returns an HTML password field. This is like a text 
field,
// but the value of the field is obscured (only stars or bullets are 
visible
// for each character).  The default size of the field is 10.  A 
starting
// value and maximum data length may be supplied.

function password_field ($name=, $value=, $size=10, $maxlen=)
{
$output = EOQ
input type=password name=$name value=$value size=$size 
maxlength=$maxlen
EOQ;
return $output;
}

// string hidden_field ([string name [, string value]])

// This function returns an HTML hidden field. A value may be supplied.

function hidden_field ($name=, $value=)
{
$output = EOQ
input type=hidden name=$name value=$value
EOQ;
return $output;
}

// string file_field ([string name])

// This function returns an HTML file field. These are used to specify
// files on the user's local hard drive, typically for uploading as
// part of the form. (See 
http://www.zend.com/manual/features.file-upload.php
// for more information about this subject.)

function file_field ($name=)
{
$output = EOQ
input type=file name=$name
EOQ;
return $output;
}

// string submit_field ([string name [, string value]])

// This function returns an HTML submit field. The value of the field
// will be the string displayed by the button displayed by the user's
// browser. The default value is Submit.

function submit_field ($name=, $value=)
{
if (empty($value)) { $value = Submit; }

$output = EOQ
input type=submit name=$name value=$value
EOQ;
return $output;
}

// string image_field 

[PHP-DB] RE: [PHP-WIN] Can I rotate a gif with PHP

2001-11-02 Thread Robert Trembath

Hello Everyone,

I am generating some analylitical reports from a database using S-Plus
that produce a gif and then calling that gif as part of the report. But
I need to rotate this gif 90 degrees CW.

Can I do that with PHP?

Platform
-
W2K
MySQL
PHP 4.04

Let me clarify this. The app is written in PHP and I cannot find
anything that references rotating an image in the PHP docs. There is
some reference to rotating images in a pdf with PHP, but nothing else.

Anyone have any ideas?

--
Robert Trembath
Internet Technology Manager
e|[EMAIL PROTECTED] 




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] RE: [PHP-WIN] Can I rotate a gif with PHP

2001-11-02 Thread Pierre-Alain Joye


 that produce a gif and then calling that gif as part of the report. But
 I need to rotate this gif 90 degrees CW.
 
 Can I do that with PHP?
 
 Platform
 -
 W2K
 MySQL
 PHP 4.04
 
 Let me clarify this. The app is written in PHP and I cannot find
 anything that references rotating an image in the PHP docs. There is
 some reference to rotating images in a pdf with PHP, but nothing else.
 
 Anyone have any ideas?
Take a look at the tool imagemagick http://www.imagemagick.org

It provides a lot of usefull functions (convert, resize, rotate,...) and available for 
w2k.
Just call the command line within the php.

hth,

pa

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]