MySQL question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • poe
    Confirmed User
    • Mar 2004
    • 455

    #1

    MySQL question

    i am displaying the contents of a database on my site..

    now i would like to tell my script to only display data if the value of one of the rows is 1, and not 0.

    is that doable?

    thanks!
  • poe
    Confirmed User
    • Mar 2004
    • 455

    #2
    to only display that entry if the value in the "approve" row is 1

    Comment

    • i-Affiliate_com
      So Fucking Banned
      • Apr 2006
      • 181

      #3
      select [fieldlist] from [tablename] where fieldname = 1

      Comment

      • poe
        Confirmed User
        • Mar 2004
        • 455

        #4
        wow, that was easy

        thanks dude!

        Comment

        • poe
          Confirmed User
          • Mar 2004
          • 455

          #5
          another question:

          how do i display the total number of entries in a table? (e.g. 340)

          Comment

          • poe
            Confirmed User
            • Mar 2004
            • 455

            #6
            figured it out!

            Comment

            Working...