C++ Program communicating with MySQL Database

前端 未结 8 1647
醉梦人生
醉梦人生 2021-01-03 10:01

Does anyone know of a simple way for a C++ program to communicate directly with a MySQL database? I have looked at MySQL++ and found it to be very confusing. If anyone kno

8条回答
  •  清歌不尽
    2021-01-03 10:47

    Are you sure that the C++ program needs to interact directly with the MySQL database?

    I would suggest having the C++ program communicate with the web server using simple http requests, and let PHP handle the database. Data can be passed to a server-side PHP script via arguments, and data can be returned in XML format.

    Writing: your.server.com/add_data.php?table="info"&data="0xFCBD..."

    Reading: your.server.com/get_data.php?table="info"

提交回复
热议问题