List:MySQL++« Previous MessageNext Message »
From:Adrian Cornish Date:October 25 2010 6:48pm
Subject:Re: Problems with storein and template queries
View as plain text  
On Mon, Oct 25, 2010 at 11:44 AM, Florian Feldbauer <
florian@stripped> wrote:

> Hey,
>
> I'm using mysql++ to get data from different tables.
> Here is an extract of my code:
>
>  vector<table1> rows1;
>  vector<table2> rows2;
>
>  // --- connect to database and create template query
>  mysqlpp::Connection conn("database",0,"user","passwd",0);
>  if (!conn.connected()){
>    cerr << "Error: Could not connect to database" << endl;
>    exit(1);
>  }
>  mysqlpp::Query query = conn.query("SELECT * FROM %1 WHERE col0 = %0q");
>  query.parse();
>
>  // --- get data from database
>  query.storein(rows1, what1,"table1");
>  query.storein(rows2, what2,"table2");
>
>
Might be completely wrong here but doesn't store in take just 2 parameters.

void
storein<http://tangentsoft.net/mysql++/doc/html/refman/classmysqlpp_1_1Query.html#298c9a98363662b3215c3b4c6743b437>(std::vector<
T > &con, const
SQLTypeAdapter<http://tangentsoft.net/mysql++/doc/html/refman/classmysqlpp_1_1SQLTypeAdapter.html>&s)
 Specialization of
storein_sequence()<http://tangentsoft.net/mysql++/doc/html/refman/classmysqlpp_1_1Query.html#ef0903637280a12ca40b1d670ed502c0>for
std::vector.
Adrian

Thread
Problems with storein and template queriesFlorian Feldbauer25 Oct
  • Re: Problems with storein and template queriesWarren Young25 Oct
    • Re: Problems with storein and template queriesFlorian Feldbauer25 Oct
      • Re: Problems with storein and template queriesWarren Young26 Oct
        • Re: Problems with storein and template queriesFlorian Feldbauer26 Oct
          • Re: Problems with storein and template queriesWarren Young26 Oct
            • Re: Problems with storein and template queriesWarren Young26 Oct
              • Re: Problems with storein and template queriesFlorian Feldbauer27 Oct
                • Re: Problems with storein and template queriesWarren Young3 Nov
  • Re: Problems with storein and template queriesAdrian Cornish25 Oct
    • Re: Problems with storein and template queriesWarren Young25 Oct