view tests/sqliteTime.ur @ 1907:cb57ba73a61d

make uninstall: Uninstall types_cpp.h, urweb_cpp.h Signed-off-by: Anders Kaseorg <andersk@mit.edu> --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
author Anders Kaseorg <andersk@mit.edu>
date Fri, 22 Nov 2013 09:36:14 -0500
parents 703c2c94afd5
children
line wrap: on
line source
table dates : { Date : time }

fun aform () =
    let
        val a : time = readError "01/02/03 04:06:07"
    in
        dml(INSERT INTO dates (Date) VALUES ({[a]}));
        ds <- queryX (SELECT * FROM dates)
                     (fn r => <xml>{[r.Dates.Date]}<br/></xml>);
        return <xml><body>{ds}</body></xml>
    end

fun main () =
  return <xml><body><form><submit action={aform}/></form></body></xml>