• 26Dec

    In this tutorial I go over deleting rows, not only in PHPMyAdmin, but in PHP as well. Once rows are deleted, they are not coming back. On the side note, it is good to use something that is unique to every row when modifying them or deleting them. Otherwise you can delete anything that matches the name being “orange” and delete two rows. This is why I usually always have an ID field in my rows.
    This video tutorial goes over how to select rows from a database in PHPMyAdmin and then in PHP and then process the rows individually. Also this goes over ordering(ORDER) and limitation(LIMIT) in the SQL.
    You can find this tutorial video on youtube here.

    Source used after the jump;
    Read more…

    Tags: , ,

  • 13Dec

    I made a visual animation that will hopefully give light to those who are more visual learners.

  • 11Dec

    By using PHPMyAdmin, we can first create the result we want to have in our code, and then copy the SQL into PHP and query it with mysql_query($sql). However we need to save the result for further data retrieval. Next, we need to count how many rows there are as an error prevention measure with mysql_num_rows($result), and then find the rows one at a time with mysql_fetch_array($result) within a loop.
    Take a look at the source after the jump to see what I mean, or just watch the video.
    This video tutorial goes over how to select rows from a database in PHPMyAdmin and then in PHP and then process the rows individually. Also this goes over ordering(ORDER) and limitation(LIMIT) in the SQL.
    You can find this tutorial video on youtube here.

    Source used after the jump;
    Read more…

  • 05Dec

    PHPMyAdmin allows you to easily administer MySQL databases and it can provide the SQL statements used so you can redo what you did in php code.
    First, it is important that you have a user to administer the database with, then you can connect to it through PHP. After that, you need to connect to the database, and then select the database that you are going to operate in. After that, you can safely execute your queries. However, to be truely safe, if you are handling variables that you generate, or the user has access to, you will want to use mysql_real_escape_string to protect yourself from SQL Injection.
    In this introduction, I show how we can insert rows into a table not only in PHPMyAdmin, but also through PHP by basing the SQL statement from the one provided by PHPMyAdmin. Also, in order to connect to a database in the first place, you need to have a user and the code to do so.
    You can find this tutorial video on youtube here.