I would suggest getting familiar with SQL first. Don't try mixing processing query results in PHP and learning how to do SQL into one job. It will complicate things unnecessarily. You can do a lot with just a local MySQL database and a decent administration tool. I'd recommend getting MySQL 5.0 with the GUI administrator utility. Its free and pretty easy to use and you don't have to worry about bandwidth or code or blowing anything up and losing all your data.
To really be able to play around though, you are going to need to know some basic concepts and terminology. Here is how it makes sense in my head(I am no expert on the matter though, so follow up with some authoritative sources).
These things are central to most any database system and if you understand how they work together, you can have a pretty good chance at finding your way around just about any database system(or at least not be quite as lost):
Users
Databases
Tables
Views
Queries
Functions
They very loosely fit together like this: Users(database users, not your site visitors) have different access rights that allow them to do different things with different databases. A database is a way of organizing different sets of related or connected data(databases should be used this way anyways - though most cheap web hosts will only allow you one database to play with - and only one database user for that matter).
Inside a database, you can have many tables of actual data. This is where you can store your actual data in a row/column format(much like cells in a spreadsheet). This part is where you will spend most of your time doing SQL statements to do pretty much everything regarding the actual storage, removal and editing of any of your data. Tables should help you organize your information into useful, convenient and compact groupings. It is really a balance between these factors (and of course performance and maintenance overhead) that make up the bulk of being somewhat decent at creating and maintaining a database.
A basic rule of thumb is that you want to avoid repetition in your data. This concept is often summed up with the term database normalization(or just normalization - look it up real quick, but don't try becoming an expert on your first go). It is very easy to get carried away with this, so resist the impulse to normalize anything and everything once you start learning about it. Just use what makes sense for your application and what makes things easier to work with. But definitely know what it is. The terms INDEX, FOREIGNKEY and PRIMARYKEY should be understood before any serious effort to do this is made - else, you may become lost and confused and your database will seem like it is slow and wasteful.
You can offset a lot of the maintenance issues by setting up a view(once you have a need for them and are familiar with the SQL JOIN and/or UNION statements). A view is kinda like a custom way of looking at a bunch of pieces of data - either from different tables or with additional information appended to a result set(things like maximum values, counts or other useful bits of information) - in a set, specific way. These will become very useful as you begin to incorporate the ideas of data normalization into your database(probably can ignore them until then, but again, know they exist).
Queries are the bread and butter of everything you do. They are what makes SQL a Structured Query Language. You tell your database how to do anything and everything with a query. Even the GUI interfaces(MySQL administrator, PHPMyAdmin) use queries to shape and form your database into something useful. This is where you will really want to dig in and read over documentation and follow some examples. Start with SELECT, then once you feel comfortable with that, move onto the other main types of queries(UPDATE, CREATE, ALTER, TRUNCATE, DROP - be careful though, there is no undo...) as well as the many query operations(things like LIKE, LIMIT, JOIN, UNION, ORDER BY, GROUP BY/HAVING - SQL is pretty powerful and probably has a way to get it to do what you want as far as data manipulation and storage goes. It is really just a matter of becoming familiar with what is out there, and then learning how to best implement your solutions).
Functions can be as varied as the different database engines. I recommenced MySQL, mostly because that is probably what you have running if you are running on a PHP server(MSSQL is another popular choice for web hosting companies, though not nearly as much as MySQL). Functions serve the purpose of making common tasks easier. There are things like COUNT() NOW() UCASE() LCASE() MAX() MIN() AVG() and many many more. Again, knowing they are out there will save you a lot of time in not having to recreate the wheel.
My main intent is to give a good background, and a lot of keywords to search off of. Really though, you will want to dive in and start playing around with things as that is the best way to learn.