Subscribe
Tutorial search

PHP Database Tutorials


We hope that you will enjoy our PHP Database tutorials. Feel free to contact us if you would like to be a tutorial hero and contribute your own PHP Database tutorial to our site. Thank you !

Sort by:
An alternative to ORDER BY RAND() for MySQL
An alternative to ORDER BY RAND() for MySQL
I've posted previously about how to randomly order a resultset with MySQL using RAND() but the issue with RAND() is it will be inefficient on large tables because each row needs to have the random number calculated before the resultset can be ordered. This post looks at an alternative which requires two queries but will be much more efficient for large tables.
Difficulty:
Extracting a random row from sql database
Extracting a random row from sql database
Many sites need to get some random values from the database, for example to show a random imagine, quote or in case of online stores to show random products.
Difficulty:
How to escape variables with PHP PEAR DB with bound placeholders
How to escape variables with PHP PEAR DB with bound placeholders
A week ago I looked at how to escape a string for use with a SQL query using the PHP PEAR DB escapeSimple function. This is useful for embedding a variable directly into a SQL query string but it can be a lot easier to use bound placeholders instead and let PEAR DB do all the escaping.
Difficulty:
Make a Client Area Part 1
Make a Client Area Part 1
A few days ago, I created a poll to see how many freelancers actually had a client area for their site. Surprisingly, I found out that only 23% of them had one so I decided to to write a tutorial for you guys. Even if you are a newbie to PHP or don’t need a client area, read this tutorial as it would help you improve your PHP skills.
Difficulty:
Record locking in Web applications
Record locking in Web applications
In this article we describe how to implement record locking in web applications. Because of the stateless nature of HTTP, you cannot really know whether the user left the page or is still looking at your site. We used the lock confirmation technique combined with lock expiration to solve this problem.
Difficulty:
Debugging MySQL issues in PHP
Debugging MySQL issues in PHP
Possibly the most common issue users have with PHP is working with MySQL. When a query fails, many users don't know where to begin debugging. This guide outlines my debugging procedure.
Difficulty:
dynamic website part 2
dynamic website part 2
Part 2 of the "dynamic website" tutorial serie. In this part we will create a basic database and query this database to display the articles. We'll then implement a very simpel but kick ass pagination.
Difficulty:
Create an In-Place Editing System: One Step Further
Create an In-Place Editing System: One Step Further
A few months ago, you learned how to create an in-place editing system. Today, we'll take things a step further as we create a simple backend, which will allow our website to remember the changes that we've made.
Difficulty:
Creating a Blogging system (part 1)
Creating a Blogging system (part 1)
Create your own Blogging System (a simplified version of Wordpress) using PHP and MySQL. Learn how to sanitize your entries using mysql_real_escape_string function and learn how to add the blog posts to your database.
Difficulty:
MySql and PHP Tutorial
MySql and PHP Tutorial
Learning and using PHP language without interacting with a Database doesn't have much sense at all,and specifically MySql,and ,while you learning you'll be delighted to discover how simple it is.I'll show you how to crate a Database and Tables where to store your data and then how to retrieve and manipulate the data you stored.
Difficulty:
Systems - Register System
Systems - Register System
Explaining how to and creating a register system working based on database (interaction).
Difficulty:
Systems - Login System
Systems - Login System
Tutorial about creating a simple but secured login system. Uses database interactions in combination with a few loops and sessions to store user login into.
Difficulty:
Advanced Event Timeline With PHP, CSS & jQuery
Advanced Event Timeline With PHP, CSS & jQuery
In this tutorial we are making an Advanced Event Timeline with the help of PHP, MySQL, CSS & jQuery, that will display a pretty time line with clickable events.
Difficulty:
Bit.ly API and adding URLs to your MySQL database
Bit.ly API and adding URLs to your MySQL database
A tutorial on using bit.ly API and implementing it into your website. Also, a tutorial that explains how to add that shortened link into your MySQL database so that it works.
Difficulty:
How to connect two mysql databases in PHP?
How to connect two mysql databases in PHP?
The sample code below makes 2 database connections and the reference to each database connection is stored in separate variables. Whenever you connect multiple databases you have to specify the link in mysql_query function to tell PHP to run the query on the specified database.
Difficulty:
Total Tutorials in Category: 252