RSS Forums RSS
Please support our C++ advertiser: Programming Forums

MySQL++ query question

Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,565
Reputation: Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of 
Rep Power: 40
Solved Threads: 977
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Most Valuable Poster

Re: MySQL++ query question

  #2  
Apr 3rd, 2007
you could use std::string class and just concantinate the value with the string
std::string query = "SELECT * FROM table1 WHERE id = ";
query += value;

now the problem is that if value is a string you will probably have to enclose it in quotes

std::string query = "SELECT * FROM table1 WHERE id = '";
query += value;
query += "'";
<<Freelance Programmer>> << Hobby Site>>
Signature links for sale. PM me for details
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 1:04 pm.
Newsletter Archive - Sitemap - Privacy Statement - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC