Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Help Please

Options
  • 07-08-2008 6:28pm
    #1
    Closed Accounts Posts: 368 ✭✭


    I will probably get slated for asking such a basic question! But where or what do I do with the sql code once I have writing the query.:o:o:o:o:o

    I’m learning how to build databases for myself and this has me stumped.


Comments

  • Registered Users Posts: 1,916 ✭✭✭ronivek


    Well generally you use some form of query browser or alternatively you could write a little snippet of code to execute the query.

    You really need to supply a bit more information for me to be of any help; what database software do you intend to use? Are you trying to perform a query in a particular language or context? What exactly are you trying to do?


  • Closed Accounts Posts: 368 ✭✭DrivingInfo


    I’m using MySqL.
    I can build the admin form but don’t know what I do with the sql query (code).

    In the Admin I need to add new, update, delete, and search, I also need to display information from within the database.

    Lets say I have a button and need the button to run a query, HOW do i do this WHAT do I do with the query or code.

    Even if you could tell me how to tie sql to the form would help.


  • Closed Accounts Posts: 18,056 ✭✭✭✭BostonB


    You need to make a connection to the database. The query it and return the results into something like a dataset which you can then bind to a datadrid. Well thats one way.

    http://www.homeandlearn.co.uk/NET/nets12p5.html


  • Closed Accounts Posts: 368 ✭✭DrivingInfo


    What is the most straight forward way of doing it (the best way with fastest return?)


  • Closed Accounts Posts: 18,056 ✭✭✭✭BostonB


    I forgot you are using MySQL, I don't use that myself. Why is speed an issue at this point? Get it working first.


  • Advertisement
  • Closed Accounts Posts: 368 ✭✭DrivingInfo


    BostonB wrote: »
    I forgot you are using MySQL, I don't use that myself. Why is speed an issue at this point? Get it working first.

    Ill try to work it the way you have suggested.

    I don’t want to do the work and then find out that there is a better way of doing it with faster returns on the query.

    Thank you


  • Registered Users Posts: 9,216 ✭✭✭MrVestek


    Ill try to work it the way you have suggested.

    I don’t want to do the work and then find out that there is a better way of doing it with faster returns on the query.

    Thank you

    That's lazy programming right there. Programming is all about trial and error. Get the program working first then work on speed issues.


  • Closed Accounts Posts: 18,056 ✭✭✭✭BostonB


    How you write the query and how the database is designed, is likely to have a far greater effect then how you connect to it.

    Maybe theres a better way for MySQL and maybe data binding/data grid isn't what you need. But only you will know that answer.


  • Moderators, Science, Health & Environment Moderators Posts: 10,079 Mod ✭✭✭✭marco_polo


    Simplest way is to use the query browser that comes with MySql . You should see it in the program files menu under MySQL. Enter the database, schema, username /password that you want to to connect to.

    Once this is done paste your queries in the window and press the execute button.

    ** Edit ** Ok this seems to be more of a language specific programming issue, and you haven't even stated what language you will be using to create the form that will connect to the DB. Is it .net, java php?


  • Closed Accounts Posts: 1,444 ✭✭✭Cantab.


    to OP:

    Download MySQL and install.

    Open a command/terminal window and type: 'mysql'

    Away you go.


  • Advertisement
  • Closed Accounts Posts: 18,056 ✭✭✭✭BostonB


    I've just realised the OP may not be programming. I just assumed that since this is the programming forum.


  • Closed Accounts Posts: 368 ✭✭DrivingInfo


    I am using MySQL and Use php.
    What I don’t understand is how the query is connected to the php document.


  • Registered Users Posts: 3,568 ✭✭✭ethernet


    I am using MySQL and Use php.
    What I don’t understand is how the query is connected to the php document.
    The results of your query are stored in an array after you use the special PHP functions to connect to a MySQL server. You pick what you want out of it (loop through it). Think this is what you've asked :)


  • Closed Accounts Posts: 71 ✭✭Mach


    I am using MySQL and Use php.
    What I don’t understand is how the query is connected to the php document.

    Ok go down to your local book shop or head over amazon and get Begining PHP an MySQL5 from Apress


  • Moderators, Science, Health & Environment Moderators Posts: 10,079 Mod ✭✭✭✭marco_polo


    Decent basic tutorial here should give you all the basics of php to my sql.

    http://www.databasejournal.com/features/mysql/article.php/1469211


  • Closed Accounts Posts: 827 ✭✭✭thebaldsoprano


    Hi OP

    If you just want the thing to work and aren't that interested in the details of embedding your SQL in another language I think Dreamweaver might do that.

    You'd defo want to double check this though, the only part of Dreamweaver I've seen is when debugging some PHP it generated for a friend of mine.


Advertisement