List:MySQL++« Previous MessageNext Message »
From:cgifalco Date:October 5 2004 1:43pm
Subject:To get value from MySql field problem
View as plain text  
Hi mySql++ gurus,

I installed mysql++-1.7.17-1 on Fedora Core 2. Here is the snippet of the code I


    #include <iostream>
    #include <mysql++.hh>
    Result res =;
    Row row;
    res::iterator i;

    for ( i = res.begin(); i != res.end() ; i++ ) {

    row = *i;
    cout << "Name" << row["name"] << "\n";

    The output is "a"  - the second letter, never mind of the name of the mysql
database field, it issues the second letter every time. But when I use instead

    cout << "Name" << row["name"] << "\n";

this command

    cout << "Name" << row[1] << "\n";

all is OK, cout prints the value of the field "name".

Thank for a help.


To get value from MySql field problemcgifalco5 Oct
  • Re: To get value from MySql field problemWarren Young5 Oct