Skip to content

Commit

Permalink
Highlight SELECT queries as cause of issues with sql_affectedrows
Browse files Browse the repository at this point in the history
  • Loading branch information
marc1706 committed Jul 6, 2024
1 parent c791595 commit 3a3b8a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion development/db/dbal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ Example:
$affected_rows = $db->sql_affectedrows();
.. warning::
Be cautious when using ``sql_affectedrows()`` to determine the number of rows affected by your query.
Be cautious when using ``sql_affectedrows()`` to determine the number of rows affected by your query, especially with **SELECT** queries.
This function's behavior can differ depending on the used database driver and whether the query was cached.

Do not rely solely on ``sql_affectedrows()`` to confirm the number of impacted rows. Consider alternative approaches
Expand Down

0 comments on commit 3a3b8a7

Please sign in to comment.