List:General Discussion« Previous MessageNext Message »
From:Warren Young Date:August 15 2008 1:35pm
Subject:Re: Need help to query with timestamp in C++
View as plain text  
Kandy Wong wrote:
> 
> And what is the good connector (C++ to MySQL) to use?

MySQL++ (http://tangentsoft.net/mysql++/) has native Date, Time, and 
DateTime data types.  You can convert to these types implicitly:

	mysqlpp::DateTime dt = row["my_column"];

Row::operator[] doesn't return DateTime, it returns a stringish type, 
which can convert itself to lots of different C++ data types.  This is 
useful because the MySQL C API normally returns results in string form, 
so you need a natural way to convert these values to the native C++ 
types for processing.  In this particular case, it saves you from having 
to do the timestamp string parsing yourself.
-- 
Warren Young, maintainer of MySQL++
Thread
Need help to query with timestamp in C++Kandy Wong15 Aug
  • Re: Need help to query with timestamp in C++Saul Bejarano15 Aug
    • Re: Need help to query with timestamp in C++Kandy Wong15 Aug
      • Re: Need help to query with timestamp in C++walter harms15 Aug
      • RE: Need help to query with timestamp in C++Jerry Schwartz15 Aug
  • Re: Need help to query with timestamp in C++DuĊĦan Pavlica15 Aug
    • Re: Need help to query with timestamp in C++Kandy Wong15 Aug
  • Re: Need help to query with timestamp in C++Warren Young15 Aug