adding function, module to database
Hi, suppose there is a database with lots of tables. I want to add a function to this database to return the following SQL query: SELECT SUM(IF(HOUR(start)>'02:00:00' AND HOUR(stop)<='08:00:00',50*sessiontime,0)+IF(HOUR(start)>'08:00:00' AND HOUR(stop)<='14:00:00',100*sessiontime,0)+IF(HOUR(sta
complex sql query...
Hi, Suppose there is a sql table with the following fields and values: +-+ |username|start|stop |sessiontime| ++-+--+---+ |mehdi | 2002-08-12