PHP Tutorial – 25 – Selecting a MySQL Database

On March 9, 2010, in Uncategorized, by admin

PLEASE, watch this video in high def here www.youtube.com its much better, and make sure to subscribe to my channel! thenewboston.com

  • Share/Bookmark


PLEASE, watch this video in high def here www.youtube.com its much better, and make sure to subscribe to my channel! thenewboston.com

  • Share/Bookmark
 

25 Responses to “PHP Tutorial – 25 – Selecting a MySQL Database”

  1. d2cky says:

    I don’t know if you went through this but it might be able to help others later on.

    Instead of going out and purchasing webspace, it is possible to do this locally. If you open your mysql commandline client, you can manually input the database yourself.

    Once that is completed when you get to the $dbc, the username is then “root”, with the master password you inputted during installation.

    Example:
    $dbc = mysql_connect(‘localhost’, ‘root’, ‘password’);

  2. tyler4you1990 says:

    you need to put the first part of your website on the mysql_select_db like in his other tutorial you need to include the first part of your website underscore then the database name and it will work

  3. Aoudhubillahi says:

    Impressive series of works. Bravo.

  4. Oamaok says:

    earlier code works now, but thanks. this may help others.

  5. ThaEmielNL says:

    change
    $dbc = mysql_connect(‘localhost’,'username’,'password’);
    with
    $dbc = mysql_connect(‘localhost:3306′,’username’,'password’);

  6. skyheero says:

    you need to fix your code :: it case me some headache but here the right code for everyone trying to learn

    if (!$dbc){
    die(“not connect”.mysql_error());
    }
    //select databse
    $db_selected = mysql_select_db(“game”,$dbc);
    if(!db_selected)
    {
    die(“cant connect:”.mysql_error());
    }

  7. rlharris9337 says:

    I think you need “localhost” first, then username and password. Try that.

  8. coolshoos says:

    same with me!

  9. Oamaok says:

    usernames, passwords etc. are right.

  10. Oamaok says:

    Okay, this is what I get:
    Warning: mysql_connect() [function.mysql-connect]: Access denied for user ‘********_********’@'localhost’ (using password: YES)
    Could someone help?

  11. hugovasto says:

    Man youre the best teacher ever
    i barely speak english but with your method
    it was very easy to learn some php thankyou very very much

  12. voteforgod says:

    youre a really good teacher. thank you.

  13. asimkhanalizai says:

    excellent work, thanks alot ,you saved my lots of time to read book to review,god bless

  14. lambda501 says:

    look forward to more.please carry on the good work.

  15. Poskusin says:

    Love your vids, but be careful when you tell people to type exactly what you have. If they don’t know any better, they are going to enter your typos (there’s a few) and be really confused when it doesn’t work.

  16. mectoonTube says:

    Excellent!
    Thanks a lot.

  17. nextblain says:

    oh! i dint know that! thnxz for telling XD

  18. SomaVIII says:

    &fmt=18 is high quality &fmt=22 is high def which not all videos can go high def

  19. nextblain says:

    i think add “&fmt=18″ to the video url and it will become hi-def! XD

  20. nextblain says:

    dude, u deserve to be a youtube partner! you are not like other partners, you r good

  21. joesenter says:

    Loved all the tutorials. Have been watching and learning all day. Felt gipped, however, when starting from lessons 24 images became blurry from the hi-def requirement :( Furthermore, GoDaddy ( I know, I know) had different set up procedures ( you had to get their PHP script in order to connect). Never the less, you should set up a Pay Pal option own your site, I bet you could live off the many thankful views. Thanks again for the outstanding presentations. Look forward to more!

  22. amri5987 says:

    thanks dude.. nice tutorials..

  23. amgharo says:

    hahahha

  24. turxxx says:

    Thanks for the PHP tutorials, dude. I appreciate it.

  25. YouGotTeaBagged says:

    Great! ;)

Leave a Reply

Get Adobe Flash playerPlugin by wpburn.com wordpress themes

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...