Всем привет. Новичок в erlang. Поставил yaws, решил создать простой сайтик. Есть такая проблема: Получаю данные из БД:
<erl>
out(A) ->
application:start(odbc),
ConnString =
"Driver={MySQL ODBC 5.2 ANSI Driver};" ++
"Server=127.0.0.1;Database=teamsDatabase;" ++
"User=root;Password=1q2w3e;" ++
"Option=3;",
{ok, Conn} = odbc:connect(ConnString, []),
Results = odbc:sql_query(Conn, "select * from teams limit 2"),
{ehtml,
[{h4,[], "The database result:"},
{hr},
{ol, [],lists:map(fun(S) -> {li,[], {p,[],S}} end,Results)}]}.
</erl>
ERROR erlang code threw an uncaught exception:
File: c:/yaws/zero.yaws:39
Class: error
Exception: badarg
Req: {http_request,'GET',{abs_path,"/zero.yaws"},{1,1}}
Stack: [{io_lib,format,
["method: ~p",
{selected,["id","team_name","wins_count","looses_count",
"goals_deals","goals_misses"],
[{1,"Команда 1",0,0,0,0},{2,"Команда 2",0,0,0,0}]}],
[{file,"io_lib.erl"},{line,155}]},
[{1,"Команда 1",0,0,0,0},{2,"Команда 2",0,0,0,0}]