Converting SQL Query into a webpage

Discussion in 'Databases' started by joujoba, May 27, 2010.

  1. #1
    hello

    I have created tables in MySQL (I now have a complete database in it).
    but i need to run some queries just to show them for my School Project as a website,
    which means when i click on the button XYZ for example i get the result of the query of XYZ.

    how can i do that please?
    thank you
     
    joujoba, May 27, 2010 IP
  2. saviola

    saviola Peon

    Messages:
    17
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Obviously your a beginner in this area!
    Just you can creat a three different forms, which contain three different buttons (X,Y,Z).
    The actions attributes of forms must going to three different PHP files or one file with three verifications about selected button (if ($_POST['X'] elseif $_POST['Y']) ...) and there yuo just do some SQL querys which return results of DB. For everyone button you have to execute a different SQL query.
     
    saviola, Jun 3, 2010 IP
  3. saviola

    saviola Peon

    Messages:
    17
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    About SQl query you can find information or examples on this site www.java2s.com/Tutorial/MySQL/0040__Select-Query/0020__Introduction.htm.
    In order to execute your queries first must be selected database and connect it with the help of a functional language that you use.

    Good Luck!
     
    saviola, Jun 3, 2010 IP
  4. mrx345

    mrx345 Peon

    Messages:
    68
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You can write a simple application in php which reads data from the DB and renders a web page with results
     
    mrx345, Jul 23, 2010 IP