Learning SQL advice

Discussion in 'Databases' started by ScottDB, May 17, 2011.

  1. #1
    Hi, I am trying to learn SQL and PHP. I plan on going to college for programming soon. I have been learning from tutorials on the web site tizag.com. Great site and easy to learn from. For the SQL part of the tutorials it uses SQL Server Express 2008.

    I went to use the information that they taught in the tutorials in my cpanel and found that it did not work. After some studying I figured out that it was a different version so had it's own version of code. Am I correct in this? Don't know what version Gator is running.

    So was wondering if there was a tutorial that was as easy to understand or a good one for Gators phpmyadmin? Googled but couldn't find one. Any other advice for someone who realy wants to learn sql and php
     
    ScottDB, May 17, 2011 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    Every Linux based php setup will be using MySQL or PgSQL and not SQL Server. SQL Server is microsoft software that operates only on windows. Somewhere around 80 - 90% of web servers are linux or other non-windows distros.

    This is a good resource for learning php - http://www.tuxradar.com/practicalphp. Also, php has improved MySQL functions. These are more efficient and offer an object oriented approach to working with a database. http://www.php.net/manual/en/book.mysqli.php

    MySQL will be similar to using SQL Server. The queries are slightly different but are easily recognizable. phpmyadmin is the same no matter who it is hosted with. Here's a rough tutorial on how to use it. http://www.reg.ca/faq/PhpMyAdminTutorial.html

    Generally you would create a database in cpanel. You would then create the tables for your databases in phpmyadmin. Then you need to create a user in cpanel. You use this user to interact with the database in your php code.
     
    jestep, May 18, 2011 IP
  3. ScottDB

    ScottDB Greenhorn

    Messages:
    95
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #3
    Thanks for those links. I am understanding how to write the sql and php codes easily enough. I understand how to create a database and post queeries to it and have them show up in the queery results. What I am not seeing anywhere in any of the tutorials is how to get the queeries to show up on a page.

    example: If I use a simple php page with the opening and closing tags of php on it and insert the following code it should show up on the page in the browser correct?

    $sql = "SELECT * FROM memb_info LIMIT 0, 30 ";

    I cant get this to show on the page. Am I missing a step somewhere? I've also tried it with calling the database as well using
    use database; above that in the tags.
     
    ScottDB, May 19, 2011 IP
  4. bigmac_lfc

    bigmac_lfc Peon

    Messages:
    131
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    bigmac_lfc, Jun 1, 2011 IP
  5. unknownpray

    unknownpray Active Member

    Messages:
    3,831
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    70
    #5
    The best way to learn sql go for lynda.com you can finde best audio,vedio and text tutorials
     
    unknownpray, Jun 24, 2011 IP
  6. shiva0077

    shiva0077 Peon

    Messages:
    110
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    you can read or understand sql from w3schools.
     
    shiva0077, Jun 29, 2011 IP
  7. amkeabhi123

    amkeabhi123 Member

    Messages:
    219
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #7
    you can use the http://sql.org /
    available the great major contents .
     
    amkeabhi123, Jul 1, 2011 IP
  8. shiva0077

    shiva0077 Peon

    Messages:
    110
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    welcome world
     
    shiva0077, Jul 2, 2011 IP
  9. simran3008

    simran3008 Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    w3schools is a good site.use that
     
    simran3008, Jul 18, 2011 IP
  10. tks

    tks Well-Known Member

    Messages:
    89
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    108
    #10
    Here are my favorite 3 sites: tizag, w3schools and java2s.
    You can find plenty of tutorials here for both php and MySQL!
     
    tks, Jul 19, 2011 IP