1 Reply Latest reply on Aug 20, 2008 4:23 AM by Günter Schenk

    Get Number of Rows?

    921creative
      Is there a simple way with ADDT to get the NUMBER of rows in a table that contain a particular ID or other value? Would QueryBuilder be the place to do this, or is there a snippet of code?

      For example, to find out how many students have registered for a class with an ID of "100", I would need to query the classes table to find out how many student IDs fall within a row containing the class ID "100"...
        • 1. Re: Get Number of Rows?
          Günter Schenk Level 4
          Hi Brian,

          assuming that you´ve established a standard recordset that´s based on such a "WHERE ID = 100" criterion, you can always use DW´s native "Display Record Count -> Display Total Records" behaviour to echo the number of records which match that criterion.

          What´s getting evaluated by this behaviour, is the "mysql_num_rows" value, which returns the number of rows in a recordset:

          Cheers,
          Günter Schenk
          Adobe Community Expert, Dreamweaver