Re: [PHP-DB] file and mail

2001-04-25 Thread Sigitas Paulavicius
Hi all I have a text file with email addresses. Each line contains one email address. I read the file using file() function. Below is a snippet of my code $staff = file(staff); for($x=0; $xcount($staff); $x++){ $to = $staff[$x]; mail($to, New User Added, $mailBody, From: [EMAIL

Re: [PHP-DB] How I can use multiple results in MySQL

2001-04-23 Thread Sigitas Paulavicius
SELECT name FROM cia WHERE region = (SELECT region FROM table WHERE name = 'Brazil'); would be: SELECT cia.name FROM cia, table WHERE cia.region=table.region AND table.name='Brazil' SELECT name FROM table WHERE count = (SELECT max(count) FROM table); if there may be more than one record