We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5a67262 + d8590ed commit 88a445bCopy full SHA for 88a445b
development/db/dbal.rst
@@ -383,6 +383,13 @@ Example:
383
384
$affected_rows = $db->sql_affectedrows();
385
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
393
sql_nextid
394
----------
395
Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
0 commit comments