Click here to Skip to main content
15,845,308 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I can find nothing on mysql.h, next to nothing on mysql++, and everything about connector/c++ but am still confused.


If I'm only interested in simple queries, SELECTing and UPDATEing WHEREing the PRIMARY and only straight INSERTs & DELETEs without WHEREs, in other words relying 100% on c++ for all sorting/logic, is there any benefit to using anything other than mysql.h? No database creation, transactions, etc from code.



Thanks in adVance,.
Posted
Updated 27-Feb-13 17:29pm
v4

1 solution

There is no such function like select function or insert function.

You will have to execute all function using mysql_query(C).

here is a simple example of how to execute a query:

C++
    int ret;
    StringA Query;
    Query="SELECT EVERYTHING FROM EVERYWHERE WHERE NOBODY LIKE 'YOU'";
if(conn==NULL)
    return NULL;
MYSQL_RES *result;
ret=mysql_query(conn, Query.GetBuffer());


for more information go to google.com
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900