• Friday , 24 November 2017

PHP Tutorial 26 – MySQL Introduction (PHP For Beginners)

Code Canyon



Processing massive amounts of data without impairing the usability of an application is the most important to consider when developing high-end applications.

Original source

3d Ocean

Related Posts

21 Comments

  1. TheSwanlake1234
    August 28, 2017 at 05:00

    Hi, I got an error message " Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:xampphtdocstutorialsmysql.php:5 Stack trace: #0 {main} thrown in C:xampphtdocstutorialsmysql.php on line 5".

    any idea how to solve it?

    The code I used is: "mysql_connect("localhost", "root", "password") or die(mysql_error()); "

    I tried adding an "i" to the code so that it becomes "mysqli_connect", the it still doesn't work.

    Regards,
    Andy

  2. Mohamed Ahamed Sabeer
    August 28, 2017 at 05:00

    Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: YES) in C:xampphtdocsNew foldermysql.php on line 3
    mysql_error

    how to solve this error???

  3. saeed ullah
    August 28, 2017 at 05:00

    I have to new latest version but it have not any security link, Where is it.

  4. Zeeshan M. Raje
    August 28, 2017 at 05:00

    /to connect mysql with php coding

    <?php

    $servername="localhost";
    $username="root"; /write your username here
    $password="**"; / write your password

    $conn=new mysqli("$servername","$username","$password"); */Mysqli stands My scripted query language improved

    if($conn->connect_error)
    {
    die("not connected".$conn->connect_error);
    }
    echo"connected successfully";

    ?>

  5. Alexandra
    August 28, 2017 at 05:00

    For all who has problem:

    <?php

    $user = 'root';
    $pass = ''; //your password
    $db = 'proiectbd'; //here you write the name of your database

    $db = new mysqli('localhost' ,$user , $pass , $db ) or die("Unable to connect");

    echo "Great work"; //to see that it works
    ?>

  6. RustDude
    August 28, 2017 at 05:00

    this shit is not working!!

  7. ammulu. c
    August 28, 2017 at 05:00

    Fatal error: Call to undefined function mysql_connect() in G:XAMPPhtdocsrootmysql.php on line 4
    Help me anyone Please

  8. Jan
    August 28, 2017 at 05:00

    Your accent sounds like you're from Liverpool.

  9. Krystal Langomez
    August 28, 2017 at 05:00

    hi im using php v7.0.1 mysql_connent is not working please help me fatal error

  10. Totalytaco
    August 28, 2017 at 05:00

    to everyone who's asking for more tutorials, he works at amazon, he's busy.

  11. mflum7
    August 28, 2017 at 05:00

    mysql_connect("localhost", "root", "password")or die(mysql_error()); shows this error: Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead.

    Replace mysql_connect with PDO:
    $username = 'root';
    $password = 'password';
    $options = array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8');

    try {
        $dbh = new PDO($dsn, $username, $password, $options);
    } catch(PDOException $ex) {
        echo "An Error Occured!" . $ex;
    }

  12. 123456ahaha
    August 28, 2017 at 05:00

    isn't it that you have "password123" as password for database? how come it worked in php as "password"?

  13. Nithya Sundar
    August 28, 2017 at 05:00

    Getting errors when connecting to db,

    Access denied for user 'root'@'localhost'(using password: YES)

  14. Anu Dhanda
    August 28, 2017 at 05:00

    Hello everyone can u tell me which username & password can i entered here because when i enter the username root & password is blank or any other it show the error message like couldn't connect to the database.I am doing work on mac-book pro.Please help me   

  15. Iroshan Vithanage
    August 28, 2017 at 05:00

    Why did you stop making tutorials?

  16. Afrozen 96
    August 28, 2017 at 05:00

    its awesome and  easy to understand .. thanks buddy 

  17. RAGHAV KHANNA
    August 28, 2017 at 05:00

    hey! I wanna give you a very big thanks for these tutorials and i am also a big fan of your's as i also love web designing :)> 

  18. Nithya Sundar
    August 28, 2017 at 05:00

    what's wrong in my code can't insert data in to database

    <?php
            
            $connect = mysql_connect("localhost","root","root") or die(mysql_error());
            mysql_select_db("accounts",$connect);
            $sql = "
                CREATE TABLE users3
               {
                
    ID int NOT NULL AUTO_INCREMENT,
    Username VARCHAR(20),
    Password VARCHAR?(20),
    First VARCHAR(20),
    Last VARCHAR(20)

    )
     ";
            echo $sql;
                    
            mysql_query($sql,$connect);
            
            ?>

  19. perfumecheck
    August 28, 2017 at 05:00

    cool..good lecture

  20. Robert Lee
    August 28, 2017 at 05:00

    you awesome-sauce in programming

  21. Jezza Diaz
    August 28, 2017 at 05:00

    Hey! super thank you. You're such a good guy for conducting lectures like this. Thaaaaanks! I hope I could thank you personally.

Leave A Comment

You must be logged in to post a comment.