[ic] TO_DAYS(now())

Mike Heins interchange-users@icdevgroup.org
Mon Jul 29 16:09:00 2002


Quoting Russell Mann (tech@khouse.org):
> Hello List,
> 
> Is the sql command TO_DAYS(now()) supported in Interchange?  I have a query
> designed like this:
> 
> [query
> prefix=pre
> list=1
> type=list
> st=db
> sql=|
> SELECT * FROM table_name
> WHERE TO_DAYS(NOW()) - TO_DAYS(date) >= 0
> ORDER BY date DESC
> LIMIT 4
> |
> ]
> 
> This is designed to get the most recent four entries from today or earlier,
> based on the "date" field.  This works just fine by running the query
> straight to mySQL, and it works fine in PHP, but in Interchange it produces
> this error:

Then your table is not a MySQL table. Interchange GDBM tables don't
support SQL other than as a simple search mechanism. 


-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

"Laughter is inner jogging." -- Norman Cousins