Mysql c api doubt

Hi experts,

       I am writing a c program using mysql api. My mysql program is returning the output like

 col1          col2                    col3                  col4                                            col5

  1  ||    20040319092354 ||    37   ||    Application Error Notification    ||       Relevant line :<META

  2  ||    20040319092356 ||    30   ||    Application Error note            ||       Relevant line2 :<META

and so  on upto 'n' rows..........

I want the output to be in form

col1:::1  col2:::20040319092354  col3:::37  col4:::Application Error Notification   col5:::Relevant line :<META (eol)
col1:::1  col2:::20040319092354  col3:::37  col4:::Application Error Notification   col5:::Relevant line :<META (eol)

thus 30 rows........

Please give me idea ( preferrably code snippet) to do this......
Early responses are greatly appreciated.....

Warm regards


Who is Participating?
ankuratvbConnect With a Mentor Commented:
Borrowing code from ur other thread:

if (result = mysql_store_result(mysql))
          if(row<0) break;
                  printf("Col:%d:::%s  ",t+1,row[t]);
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.