modcaml
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Modcaml] How to use ::table(name):: - ::end::


From: Stephany Francois
Subject: [Modcaml] How to use ::table(name):: - ::end::
Date: Mon, 25 Jul 2005 10:28:48 +0200




Thank you for your quick answer ;)

I think what you wanted is something like:

  let titre = q#param "titre" in
  let auteur = q#param "auteur" in
  let ta = [ "titre", Template.VarString titre;
             "auteur", Template.VarString auteur ] in ...

or the following code which is exactly equivalent:

  let titre = List.assoc "titre" list_of_param in
  let auteur = List.assoc "auteur" list_of_param in
  let ta = [ "titre", Template.VarString titre;
             "auteur", Template.VarString auteur ] in ...


Yes, I've already tried that but there is a type problem:

File "essai2.ml", line 39, characters 28-30:
This expression has type (string * Template.var_t) list
but is here used with type Template.table_row_t list
Type string * Template.var_t is not compatible with type
  Template.table_row_t = (string * Template.var_t) list

The expression is: temp#table "parametres" ta;



Of course this is only going to produce a single row - obvious really,
since you've only asked for a single title / author pair!

You might want to have a look at storing your title(s) and author(s)
in a database ...


Yes, it's the main purpose of this little app ;) But before using a database i'd like to solve this little format problem.

Bonne chance!

Merci!  ;-)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]