MySql and PHP

Discussion in 'PHP' started by smetten, Nov 24, 2005.

  1. #1
    Hi,

    I learned alot about making MySql databases the last few days.

    But now I have a problem:

    I can make a MySql database with MySql maestro and I know how to connect to the server and database using php code, but I can´t seem to integrate php code that will display the records of my database in my php page (queries). I always get parsing errors...

    Can someone point me some places with useful php scripts that I can use to display my database records?

    Greetz

    Nick
     
    smetten, Nov 24, 2005 IP
  2. tandac

    tandac Active Member

    Messages:
    337
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    58
    #2
    There are lots of PHP/MySQL examples on the net. A quick Google should point you at something.

    For example: http://tinyurl.com/8aluw
     
    tandac, Nov 24, 2005 IP
  3. HN Will

    HN Will Guest

    Messages:
    111
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    $result = mysql_query("SELECT x FROM y WHERE a='b'");
    while ($row = mysql_fetch_array($result))
    {
    echo $row['x'];
    //or do what you'd like here
    }

    any specific questions - let us know :)


    Cheers,

    ~HN Will
     
    HN Will, Nov 25, 2005 IP
  4. blogvp.com

    blogvp.com Peon

    Messages:
    23
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    post your code, so we can see possibly see what's wrong with it
     
    blogvp.com, Nov 26, 2005 IP