[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-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

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

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;

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

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

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]

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.

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

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

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

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

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

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)

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

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

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

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

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 =

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

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

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

[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)) {

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 =

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)

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

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

[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

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

[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

[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]

[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

[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

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