List:MySQL++« Previous MessageNext Message »
From:Ovidiu Bivolaru Date:September 29 2005 11:50am
Subject:Re: Using MySQL Functions
View as plain text  
Craig,

 I think you should try a different approach:
 Query query;
 query << "insert into users(name,address,phone,timestamp) values (%0q, 
%1q, %2q, now() )";
 query.parse();
 query.store(Name, Address, Phone);

Regards,
Ovidiu

Craig Snyder wrote:

> 
>
>I would like to use some of the built-in functions available with MySQL such
>as NOW().  How do I call them when using MySQL++?
>
> 
>
>This is an example of what I am trying to do.  Unfortunately it fails, what
>am I doing wrong?
>
> 
>
>User row(0, Name, Address, Phone, NOW() );
>
>Query query = con->query();
>
>query.insert(row);
>
>query.execute();
>
> 
>
> 
>
> 
>
>Craig Snyder
>
>Chief Software Architect
>
> <http://www.inclue.com> 
>
>inclue! ...the internet on your terms.
>
> 
>
>
>  
>

Thread
Using MySQL FunctionsCraig Snyder28 Sep
Re: Using MySQL FunctionsWarren Young29 Sep
Re: Using MySQL FunctionsOvidiu Bivolaru29 Sep