[PHP-DB] one input, much mails, insert each mail in one register

2009-09-24 Thread Emiliano Boragina
Hi…

Thanks to Vinay for your help… works very good...

But I can’t validate if one or more of the emails insert in the textarea
exist in the table of the DB to not insert it, but yes insert the others
mails that not exist in the db.

This the cod:

 





Explode trial







Email















 

Thanks a lot

 

+  _
   // Emiliano Boragina _
   // Diseño & Comunicación //
+  _
   // emiliano.borag...@gmail.com  /
   // 15 40 58 60 02 ///
+  _

 



Re: [PHP-DB] Parse error

2009-09-24 Thread Ron Piggott
There are further problems with the mySQL query:

You have an error in your SQL syntax; check the manual that corresponds
to your MySQL server version for the right syntax to use near ') AND
CURDATE() <= DATE(FROM_UNIXTIME(1239508800)), 1, 0), IF(CURDATE() >=
DATE'

This is the whole query, what am I missing / doing wrong?

SELECT GREATEST( IF(CURDATE() >=
DATE_SUB(CONCAT(DATE(FROM_UNIXTIME(1239508800)), INTERVAL LEAST(14,
(SELECT COUNT(*) FROM `verse_of_the_day_Bible_verses` WHERE seasonal_use
= 1)) DAY) AND CURDATE() <= DATE(FROM_UNIXTIME(1239508800)), 1, 0),
IF(CURDATE() >= DATE_SUB(CONCAT(YEAR(CURDATE()), '-12-25'), INTERVAL
LEAST(14, (SELECT COUNT(*) FROM `verse_of_the_day_Bible_verses` WHERE
seasonal_use = 2)) DAY) AND CURDATE() <= YEAR(CURDATE()), '-12-25'), 2,
0) ) AS verse_application


On Thu, 2009-09-24 at 15:39 +1000, Chris wrote:
> Ron Piggott wrote:
> > Let me try this is a different way.  
> > 
> > What is the variable which I am able to retrieve?  I am expecting the
> > result to be a 0, 1 or 2.  
> 
> Your original problem was getting a parse error.
> 
> Your query is not php code - step 1 is to fix that.
> 
> Once you've done that, post the new code and new problem you're having.
> 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php