28.4.2 Executing SQL Statements (cont.)
- Use int_to_string and double_to_string (chptr 12)
to place numbers:
int qty = ...;
string command = "SELECT * FROM Item WHERE Quantity >= "
+ int_to_string(qty);
mysql_query(connection, command.c_str());
- mysql_query returns non-zero error code for invalid command
prev
|top
|next