[Zope] zsql method??/
Eric L. Walstad
Eric@Walstads.net
Thu, 18 May 2000 14:28:36 -0700
Oops, I forgot to mention that the CONV function is used in your ZSQL
method. Here's the ZSQL Method I use (returns upcoming birthdays falling
within this, and the next, month):
SELECT FirstName, LastName, MONTH(Birthday) AS Month, DAYOFMONTH(Birthday)AS
Day, DATE_FORMAT(Birthday, '%M %D, %Y') AS BDay,
CONV(ROUND((TO_DAYS(NOW())-TO_DAYS(Birthday))/365.25), 10, 10) as WillBeAge
FROM users
WHERE
MONTH(Birthday) = MOD(MONTH(NOW()), 12) + 1
OR
(MONTH(Birthday) = MONTH(NOW()) AND DAYOFMONTH(Birthday) >=
DAYOFMONTH(NOW()))
ORDER BY
Month, Day
// -----Original Message-----
// From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
// Jonathan Park
// Sent: Thursday, May 18, 2000 1:35 PM
// To: zope@zope.org
// Subject: [Zope] zsql method??/
//
//
// Hello everyone!
//
// I have a dtml method that calls in the sql method like this
// <dtml-in sql method>
// the result I get is what I would expect except in the unique_#
// field 'L'
// is added at the end of the number
// ex:
//
// unique_# blah blah blah
// 1L data data data
// 2L data data data
//
// any reason why it is adding the 'L'???
//
// thanks
// -jon
//
// Have a great afternoon!
//
//
// _______________________________________________
// Zope maillist - Zope@zope.org
// http://lists.zope.org/mailman/listinfo/zope
// ** No cross posts or HTML encoding! **
// (Related lists -
// http://lists.zope.org/mailman/listinfo/zope-announce
// http://lists.zope.org/mailman/listinfo/zope-dev )
//