First PHP/MySQL Project Day 3: Displaying Data

Today I did a bit of reorganization and then figured out how to select and display the data from my MySQL database. The video’s only three minutes long.

Links for Displaying Data

  • PHP MySQL Select - Info on the SELECT statement from W3Schools.com. I copied their example to display my to-do list.
  • PHP: mysql_query - All about the mysql_query function from the PHP manual.
  • PHP: mysql_fetch_array - All about the mysql_fetch_array function from the PHP manual.

By the way, I should mention that my to-do list is open to all kinds of security threats. That doesn’t matter right now, though, since I’m the only one using my site.

Posted on May 15th, 2007 | Leave a comment | Trackback URL

4 Comments

  1. John

    June 8th, 2009

    Could you help me with something? I finally found a tutorial that works, but have a question: What if I just want to display one variable from a MySQL row?

    Basically I have a login system where after login, I want it to be able to tell the user the Member ID Number. This is stored in a row next to their Member Name. I need something to pick the correct member number from the database. I am new to PHP so, any ideas?

  2. LearningNerd

    June 9th, 2009

    Hi, John. My next video on checkboxes covers the use of the WHERE clause.

    You might use a query like “SELECT MemberID FROM TableName WHERE MemberName=’value’”

    See http://www.w3schools.com/php/php_mysql_where.asp

    Good luck with PHP! I’m still just learning too. :)

  3. Jorge

    August 7th, 2009

    Have you learned how to make money with your skills?.. How about posting a tutorial on that?

  4. sri

    November 5th, 2009

    hi this is good video for beginners.

Share Your Thoughts