meaning of specified parts of this code

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • davjoh123@yahoo.com

    meaning of specified parts of this code

    if ($result) {
    $rs->datums = mysql_fetch_arr ay ($result, MYSQL_ASSOC);

    What does -do after the recordset variable $rs?

    Is datums a field name or something else?

    I have a text by Larry Ullman and have searched the web for these 2
    answers with no result.

  • klenwell

    #2
    Re: meaning of specified parts of this code

    The -indicates that the variable in question is an object with
    datums representing a property of the object. In this case, that
    property will be an array, since that is what mysql_fetch_arr ay (when
    successful). See following pages for more info:

    PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.

    Fetch a result row as an associative array, a numeric array, or both


    Tom


    davjoh123@yahoo .com wrote:
    if ($result) {
    $rs->datums = mysql_fetch_arr ay ($result, MYSQL_ASSOC);
    >
    What does -do after the recordset variable $rs?
    >
    Is datums a field name or something else?
    >
    I have a text by Larry Ullman and have searched the web for these 2
    answers with no result.

    Comment

    • Toby A Inkster

      #3
      Re: meaning of specified parts of this code

      klenwell wrote:
      The -indicates that the variable in question is an object with
      datums representing a property of the object.
      And "datums" is an anglicised plural of "datum" which is a Latin word
      meaning "something that has been given". The normal Latin plural of "datum"
      is more familiar: "data".

      Because of its Latin root, the pedantic will insist that the word "data"
      in English ought to be treated as a plural. That is, not "The data shows
      us that blah...", but rather "the data show us that blah...". Many
      pragmatists however argue that "data" has become a (singular) collective
      noun in English (much like "flock" or "bunch") and should take the
      singular form.

      --
      Toby A Inkster BSc (Hons) ARCS
      Fast withdrawal casino UK 2025 – Play now & cash out instantly! Discover the top sites for rapid, secure payouts with no delays.

      Geek of ~ HTML/SQL/Perl/PHP/Python/Apache/Linux/Linguistics

      Comment

      Working...