List:MySQL++« Previous MessageNext Message »
From:Alex Date:August 22 2008 3:47pm
Subject:Re: A way to copy mysqlpp::StoreQueryResult into a std::map?
View as plain text  
Actually, here's already a problem..

Command: help info
terminate called after throwing an instance of 'mysqlpp::BadConversion'
  what():  Bad type conversion: "info" incompatible with "i" type

The code:

                mysqlpp::Query qry_help_cmd = mysql_conn.query();
                qry_help_cmd << "SELECT `name`,`syntax`,`help` FROM
`command` WHERE name = "
                                << quote << command_tokens[1];
                mysqlpp::StoreQueryResult res_help_cmd = qry_help_cmd.store();
                if(res_help_cmd){
                        slog.clog("Name: " + res_help_cmd[0]["name"]);
                        slog.clog("Syntax: " + res_help_cmd[0]["syntax"]);
                        slog.clog("Description: " + res_help_cmd[0]["help"]);
                }else{
                        slog.clog("No help available for " +
command_tokens[1] + ".");
                };


2008/8/22 Alex <xtzgzorex@stripped>:
> Ah, yes, I figured I'd have to change it to something like that. Just
> wasn't sure how it would look.
>
> I'll give that a shot and post back if I need further help.
>
> Also, I'm assuming this bug will be fixed in 3.0.7?
>
> 2008/8/22 Warren Young <mysqlpp@stripped>:
>> Alex wrote:
>>>
>>> It says this:
>>>
>>> -- 'info' * FROM `command` WHERE `name` =
>>
>> It's probably a bug in MySQL++: the stream manipulator is overwriting the
>> start of the query, instead of appending to it.  In the meantime, change it
>> to:
>>
>> mysqlpp::Query qry_help_cmd = mysql_conn.query();
>> qry_help_cmd << "SELECT * FROM `command` WHERE `name` = " <<
>>                quote << command_tokens[1];
>>
>> --
>> MySQL++ Mailing List
>> For list archives: http://lists.mysql.com/plusplus
>> To unsubscribe:    http://lists.mysql.com/plusplus?unsub=1
>>
>>
>
>
>
> --
> GamerzWoW - http://www.gamerzwow.net
>



-- 
GamerzWoW - http://www.gamerzwow.net
Thread
A way to copy mysqlpp::StoreQueryResult into a std::map?Alex13 Aug
  • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Warren Young13 Aug
    • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Alex13 Aug
      • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Warren Young13 Aug
        • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Alex14 Aug
          • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Alex17 Aug
            • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Warren Young17 Aug
              • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Alex19 Aug
                • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Warren Young19 Aug
                  • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Alex20 Aug
                    • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Warren Young21 Aug
                      • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Alex21 Aug
                        • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Warren Young21 Aug
                          • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Alex21 Aug
                            • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Alex22 Aug
                              • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Warren Young22 Aug
                                • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Alex22 Aug
                                  • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Warren Young22 Aug
                                    • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Alex22 Aug
                                      • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Alex22 Aug
                                      • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Warren Young22 Aug
                                        • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Alex22 Aug
                                          • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Warren Young22 Aug
                                            • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Alex25 Aug
                                              • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Joel Fielder26 Aug
                                                • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Alex26 Aug
                                                  • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Joel Fielder26 Aug
                                                    • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Alex26 Aug
                                                  • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Warren Young26 Aug
                                                    • Re: A way to copy mysqlpp::StoreQueryResult into a std::map?Alex27 Aug