PHP functions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aviemma
    New Member
    • Jul 2009
    • 1

    PHP functions

    hello I am a beginner in PHP, but after doing a lot of coding I just cant differenciate between mysql_fetch_arr ay(), mysql_fetch_row (), mysql_fetch_ass oc() and mysql_fetch_enu m()...kindly plz tell wat's the main difference in using dese functions...
    thank you
  • dlite922
    Recognized Expert Top Contributor
    • Dec 2007
    • 1586

    #2
    just different ways of getting the same database result.

    The manual at php.net should help you and show you examples.


    Dan

    Comment

    • Dormilich
      Recognized Expert Expert
      • Aug 2008
      • 8694

      #3
      though it may be still too advanced… there exist classes (MySQLi, PDO) that enable you to fetch all results at once instead of looping through the result set… just a mention

      Comment

      • Markus
        Recognized Expert Expert
        • Jun 2007
        • 6092

        #4
        mysql_fetch_arr ay(), as the name suggests, will return an array of resuts (both numeric and associative - by default). mysql_fetch_row () will, that's right, return a single row. mysql_fetch_ass oc() will return an associative array. Never heard of the mysql_fetch_enu m() function, though.

        The main difference is what they're used for - the name should make that clear.

        Comment

        • Dormilich
          Recognized Expert Expert
          • Aug 2008
          • 8694

          #5
          Originally posted by Markus
          Never heard of the mysql_fetch_enu m() function, though.
          no wonder… it doesn't exist.

          Comment

          Working...