SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: How to print?

  1. #1
    SitePoint Addict ARSA's Avatar
    Join Date
    Apr 2003
    Location
    San Juan, Puerto Rico
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to print?

    ok, i got a table with some info on it about a particular item...
    and i want to retreated the "ID"

    this is my code:
    PHP Code:
    // more code here

             
    if (@mysql_query($sql)) { 
             echo( 
    "<p> The Item <b>$ItemName</b> have been added to the Inventory with the ID number <b>$ItemID</b>.</p>"); 
             } else { 
             echo( 
    "<p>Error adding submitted Item:<br><br> " 
             
    mysql_error() . "</p>"); 
            }

    // more code here 
    "I am enough of an artist to draw freely upon my imagination. Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world." - Albert Einstein

  2. #2
    SitePoint Addict ARSA's Avatar
    Join Date
    Apr 2003
    Location
    San Juan, Puerto Rico
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well I'm kinda think this way can be done but is not working

    PHP Code:
            $select "select `Item ID`, `Item Name` FROM `Inventory A` WHERE `Item Name` = '$ItemName'"
            echo 
    " .$select[Item ID]. "
    "I am enough of an artist to draw freely upon my imagination. Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world." - Albert Einstein

  3. #3
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    $sql mysql_query("SELECT test, testers FROM test");
    while(
    $row mysql_fetch_array($sql))
    {
    echo 
    $row['test'];

    Get it?

    Hope this helped.

  4. #4
    SitePoint Addict ARSA's Avatar
    Join Date
    Apr 2003
    Location
    San Juan, Puerto Rico
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Got it
    "I am enough of an artist to draw freely upon my imagination. Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world." - Albert Einstein


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •