Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10307

Return value of $db->sql_fetchrow() on empty tables is not consistent

    Details

      Description

      MySQLi return NULL when there is no further entry in the table,
      MySQL returns false in the same case.
      I think that should be made consistent for all dbms.

      http://www.php.net/manual/en/mysqli-result.fetch-row.php#38766

      from "README.PHP4-TO-PHP5-THIN-CHANGES"

      4. Be careful when porting from ext/mysql to ext/mysqli. The following
      functions return NULL when no more data is available in the result set
      (ext/mysql's functions return FALSE).

      • mysqli_fetch_row()
      • mysqli_fetch_array()
      • mysqli_fetch_assoc()

        Issue Links

          Activity

          Hide
          Oleg Oleg [X] (Inactive) added a comment -

          Do we want null or false?

          Show
          Oleg Oleg [X] (Inactive) added a comment - Do we want null or false?
          Hide
          nickvergessen Joas Schilling added a comment -

          I'd say false

          Show
          nickvergessen Joas Schilling added a comment - I'd say false

            People

            • Assignee:
              igorw Igor Wiedler [X] (Inactive)
              Reporter:
              nickvergessen Joas Schilling
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development