[erlang-questions] List processing
黃耀賢 (Yau-Hsien Huang)
g9414002.pccu.edu.tw@REDACTED
Thu Apr 1 04:28:26 CEST 2010
You can make it an array.
1> A = array:from_list(tuple_to_list({1,45,55,67,89})).
{array,5,10,undefined,
{1,45,55,67,89,undefined,undefined,undefined,undefined,
undefined}}
2> array:get(5, A).
undefined
2> array:get(4, A).
89
On Thu, Apr 1, 2010 at 2:43 AM, Saravana <navaneethanit@REDACTED> wrote:
> Hi friends,
>
> Good morning,I have doubts
>
> Here I use the code to select the result for id from mysql db
>
> ConnString = "DSN=mysqldb",
> {ok, Conn} = odbc:connect(ConnString, []),
> {selected, _Cols, Results} = odbc:sql_query(Conn, "SELECT * FROM
> marks where id=1"),
> io:format("~p",Results),
> i get the output in terminal {1,45,55,67,89}
>
> Here I wanna to process each field seperately,How to seperate each
> field in the above tuple?
>
> I wanna print the result 1,45,55,67,89 like wise individually
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>
>
More information about the erlang-questions
mailing list