1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Rep Power
    Need help urgently, got a database with product version numbers and the size of the products in (MB) on MySQL.

    I want in put the a value from the database (for instance the version number for product X) into a php document, how would I go about doing that??

  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Fitzgerald Ga USA
    Rep Power
    Try this... you will have to edit the code to match your MySQL username, password, and databse...as well as the column names...

    ------- Start Code ----------------

    $db = mysql_connect("localhost", "USERNAME", "PASSWORD");
    $result = mysql_query("SELECT version FROM (TABLENAME) WHERE product = product X",$db);

    do {

    if ($myrow[0] != "") {

    echo "Product X Version Number: $myrow[0]n";


    } while ($myrow = mysql_fetch_array($result));

    ---------------- End of Code ---------------

    Try that. Hope it works for ya!

Similar Threads

  1. Replies: 13
    Last Post: June 4th, 2004, 04:49 PM
  2. Inserting checkbox values from an array into MySQL
    By outlyr242 in forum PHP Development
    Replies: 1
    Last Post: February 9th, 2004, 04:28 PM
  3. Formatting money values in mySQL
    By Hughes2003 in forum MySQL Help
    Replies: 0
    Last Post: February 6th, 2004, 06:46 AM
  4. Zip code validation
    By krwyth in forum MySQL Help
    Replies: 2
    Last Post: January 5th, 2004, 01:29 PM
  5. Search MySQL database and filling an array with the values
    By FeelLikeGanesh in forum PHP Development
    Replies: 0
    Last Post: January 2nd, 2004, 05:51 PM

IMN logo majestic logo threadwatch logo seochat tools logo