Hello, do we have a possibility to use db_affected_rows? Wiki says following are supported:
1 db_fetch_array
2 db_fetch_object
3 db_fetch_row
4 db_field_names
5 db_num_columns
I want to count how many rows have been affected after UPDATE query has been run.
If not implemented yet, can we get it?
Welcome to the nuBuilder Forums!
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
PDO db_affected_rows Topic is solved
Re: PDO db_affected_rows
EDIT
worked around it :
worked around it :
Code: Select all
nuRunQuery($sql);
$affected_rows = nuRunQuery("SELECT ROW_COUNT()")->fetchColumn();
if ($affected_rows > 0) {
$js = "nuMessage('Good!', 2000,closePopup);
function closePopup() {
nuClosePopup();
}
";
} elseif ($affected_rows === 0) {
$js = "nuMessage('BAD');";
} else {
nuDisplayError('WRONG!!!');
return;
}
nuJavaScriptCallback($js);
-
- nuBuilder Team
- Posts: 4562
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 528 times
- Contact: