displaying mySQL data in php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zameel
    New Member
    • Nov 2007
    • 2

    #1

    displaying mySQL data in php

    how can i retrieve 10 records from a mySQL database and display it in one single page in a preferred order
  • coffear
    New Member
    • Nov 2007
    • 20

    #2
    use a limit clause in your sql
    use mysql_query to execute the query
    use mysql_fetch_ass oc to load it into an array
    iterate through the array doing whatever you wish to do with it.

    Now have you made a start ?

    Comment

    • assimlation
      New Member
      • Nov 2007
      • 9

      #3
      if you're receiving large amounts of records it may be good to use mysql_free_resu lt() at the end, this will clean out your memory.. and if you don't like mysql_fetch_ass oc you could use mysql_fetch_arr ay, which is what I usually use..

      I would also suggest using mysql_close() when you're done

      Comment

      Working...