Home arrow C++ arrow Page 7 - Building a Store Application With MySQL++ and C/C++
C++

Building a Store Application With MySQL++ and C/C++


MySQL is a great cross platform database solution. One of the reasons why MySQL is so popular is because it can be accessed from so many programming languages -- including C/C++. In this article Igal shows us how to download, install and use MySQL++, which is a C library that allows us to work with MySQL databases. Igal starts with basic connection principles and works up to creating a fully interactive product store application.

Author Info:
By: Igal Raizman
Rating: 5 stars5 stars5 stars5 stars5 stars / 90
March 17, 2002
TABLE OF CONTENTS:
  1. · Building a Store Application With MySQL++ and C/C++
  2. · Preparing the database
  3. · A basic program
  4. · Bringing it all together
  5. · Cases 2 and 3
  6. · Cases 4, 5 and 6
  7. · Conclusion

print this article
SEARCH DEVARTICLES

Building a Store Application With MySQL++ and C/C++ - Conclusion
(Page 7 of 7 )

In this article we've seen how easy it is to add MySQL support into our C/C++ applications. I've used Visual C++ to demonstrate our examples, however most C++ compilers including Borland's C++ builder and Unix's gcc/g++ compilers will also work fine, requiring only slight modifications to the way header files are included, include paths, etc.

On a little side note, everything we've seen in this article can easily be adapted to make a CGI application -- the only fundamental difference would be in the way that you accept user input. All of the code (with the exception the input and the system() function) will work in a CGI application without any changes.

Finally, here's a short list of additional MySQL++ functions that you might find useful in your MySQL++ coding adventures:

mysql_create_db(MYSQL *mysql, const char *db); //creates a database

mysql_drop_db(MYSQL *mysql, const char *db); //deletes a database

mysql_select_db(MYSQL *mysql, const char *db); //switch databases


For a complete listing of all MySQL++ functions, take a look at the documentation that accompanies the MySQL++ download.
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

blog comments powered by Disqus
C++ ARTICLES

- Intel Threading Building Blocks
- Threading Building Blocks with C++
- Video Memory Programming in Text Mode
- More Tricks to Gain Speed in Programming Con...
- Easy and Efficient Programming for Contests
- Preparing For Programming Contests
- Programming Contests: Why Bother?
- Polymorphism in C++
- Overview of Virtual Functions
- Inheritance in C++
- Extending the Basic Streams in C++
- Using Stringstreams in C++
- Custom Stream Manipulation in C++
- General Stream Manipulation in C++
- Serialize Your Class into Streams in C++

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials