Const char tableName [30]="text";//to operate the table name
Sprintf (SqlText, "delete from % s where name='asd'", the tableName);
Printf (" will perform a delete statement % s, press y/y confirm!" , SqlText);
Char c=getchar ();
If (c=='y' | | c=='y') {
Printf (" & gt;> Execution: % s \ n ", SqlText);
If (mysql_query (& amp; Mysql, SqlText)!=0) {//executing SQL statements
Printf (" Can 't delete data from the table: ");
Printf (" % s \ n ", mysql_error (& amp; Mysql)); Failed to get the last query//the error message
}
Operation has always been like this: the Table 'test. The text' doesn 't exist
I want to called test database named test under the table to read and write operations, for help
CodePudding user response:
CodePudding user response: