Results 1 to 2 of 2

Thread: my problem

  1. #1
    Junior Member
    Join Date
    Dec 2006
    Posts
    0


    my problem

    <?

    //Connect to MySQL
    $link=mysql_connect("localhost","root","");
    if($link)
    {
    echo "conenect ok
    ";
    }else{
    echo "can not connect
    ";
    }

    //Select DB
    $result=mysql_select_db("module");
    if($result)
    {
    echo "select DB ok
    ";
    }else{
    echo "can not select DB
    ";
    }

    //Select Table
    $table="compare";

    $test = mysql_query("SELECT * from $table where Activation='$data';");
    if($dbarr=mysql_fetch_array($test))
    {
    //echo "work"
    echo "Activation: ".$dbarr["Activation"]."
    ";
    echo "Input: ".$dbarr["Input"]."
    ";
    echo "Output: ".$dbarr["output"]."
    ";
    echo "Local_state : ".$dbarr["Local_state"]."
    ";
    echo "Functionality : ".$dbarr["Functionality"]."
    ";
    echo "ID: ".$dbarr["ID"]."
    ";
    }else
    {

    echo "fail
    ";
    }



    mysql_close($link);

    ?>

  2. #2
    Junior Member
    Join Date
    Oct 2002
    Location
    Thailand
    Posts
    0


    Re: my problem

    แล้วมัน error ยังไงล่ะคับ

Similar Threads

  1. FreeBSD Problem
    By Anonymous in forum FreeBSD
    Replies: 1
    Last Post: 08-10-2008, 07:35 PM
  2. Another file also get a little problem
    By Noppadol in forum PHP,ASP,Javascript, Html
    Replies: 2
    Last Post: 30-11-2004, 02:40 PM

Members who have read this thread : 0

Actions : (View-Readers)

There are no names to display.

Tags for this Thread

Posting Permissions

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