Announcement

Collapse
No announcement yet.

Quick question.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Quick question.

    I need to retrieve the biggest number from a mysql database.
    Say I need to retrieve the biggest $catergory_id and display it.

    How would the $sql line be like? 'SELECT * from catagories WHERE ??'

    i tried "SELECT MAX(category_id) from categories"
    That doesnt seem to work. hehe

    Hope you get what i mean .
    Need help quickkk thanks
    Last edited by ryany; Fri 29 Jun '01, 6:00pm.

  • #2
    SELECT * FROM catagories order by catergory_id DESC LIMIT 1

    Comment


    • #3
      Thank you God!

      Comment


      • #4
        no problem my son

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X