Announcement

Collapse
No announcement yet.

Pull out info by id #

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

  • megahard
    replied
    PHP Code:
    $result=mysql_fetch_array(mysql_query("SELECT * FROM articles WHERE id=12"));
    echo 
    "ID number: $result[id] produces $result[description]"

    Leave a comment:


  • jeffct
    replied
    PHP Code:

    $result 
    mysql_query("SELECT description FROM articles WHERE id=12");

    $description mysql_result($result0);

    echo 
    $description

    Leave a comment:


  • Dimava
    started a topic Pull out info by id #

    Pull out info by id #

    i have a table called articles with 2 columns, id (which is an auto increased number) and a column called description

    now lets say I want to 'print' the description for the row with id 12 how can i do this?

    thanks

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