Skip to content

Commit 83a53a2

Browse files
authored
Replace deprecated exec0 with exec().no_rows() in README.md (#1111)
1 parent 3cd0b42 commit 83a53a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Here's an example with all the basics to get you going:
156156
// Execute a statement, and check that it returns 0 rows of data.
157157
// This will throw pqxx::unexpected_rows if the query returns rows.
158158
std::cout << "Doubling all employees' salaries...\n";
159-
tx.exec0("UPDATE employee SET salary = salary*2");
159+
tx.exec("UPDATE employee SET salary = salary*2").no_rows();
160160

161161
// Shorthand: conveniently query a single value from the database.
162162
int my_salary = tx.query_value<int>(

0 commit comments

Comments
 (0)