Thread: retrieving data from a mysql table thorugh c++

  1. #1
    Registered User
    Join Date
    Oct 2012
    Posts
    1

    Post retrieving data from a mysql table thorugh c++

    Hi,
    I'm trying to figure out how I can pull out an element of a mysql table and set it into a variable in c++.

    For example if the table called Stock were the following:
    +-----------+-------+-------+
    : Date : Open : Close :
    +-----------+-------+-------+
    : 2009-09-21 : 34.27 : 34.19 :
    : 2009-09-22 : 34.32 : 34.08 :
    +-----------+-------+-------+

    and I wanted to set a variable named price equal to the element in (2,2) or 34.32.

    Thanks and advance for the help

  2. #2
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    the mysql client C library will do what you're asking about, and there's also an official C++ wrapper for it. go to the mysql C++ connector page for more info.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Retrieving data from a file
    By kamitsuna in forum C++ Programming
    Replies: 45
    Last Post: 02-27-2010, 09:37 PM
  2. Retrieving Data from DLL
    By JJFMJR in forum C++ Programming
    Replies: 11
    Last Post: 08-18-2008, 07:44 AM
  3. retrieving data from listboxes
    By luddeb in forum Windows Programming
    Replies: 6
    Last Post: 01-10-2006, 04:08 AM
  4. mysql++ select * from table where such = '?'
    By juschillin in forum Windows Programming
    Replies: 2
    Last Post: 09-27-2002, 03:18 PM

Tags for this Thread