Skip to content

Commit 88a445b

Browse files
committed
Merge branch '3.3.x'
2 parents 5a67262 + d8590ed commit 88a445b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

development/db/dbal.rst

+7
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,13 @@ Example:
383383
384384
$affected_rows = $db->sql_affectedrows();
385385
386+
.. warning::
387+
Be cautious when using ``sql_affectedrows()`` to determine the number of rows affected by your query, especially with **SELECT** queries.
388+
This function's behavior can differ depending on the used database driver and whether the query was cached.
389+
390+
Do not rely solely on ``sql_affectedrows()`` to confirm the number of impacted rows. Consider alternative approaches
391+
like checking the number of rows returned by `sql_fetchrow`_ or `sql_fetchrowset`_.
392+
386393
sql_nextid
387394
----------
388395
Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.

0 commit comments

Comments
 (0)