I ripped through all the exercises for SQL, at W3Scools last night. A bit ■■■■■■ in the head right now. But I know many of the commands now. But I still don’t quite know how to use the language, or how to use it in practice, for the purpose of this thread. Is there a good tutorial for doing this somewhere?
I don’t quite understand if SQL works a bit like PHP(?). You create SQL-files or something? Or do you use it inside of HTML-files?
You don’t actually create SQL files, but SQL code will be used within PHP files.
I’d recommend reading this https://phpdelusions.net/pdo
This is a thorough explanation on how to connect to a database and run queries.
But first you’ll need to set up your database, create tables, and add data.
Look up how to access PHPMyAdmin using XAMPP.
Let me know how that goes and come back with any more questions you might have!
Hmm very helpful.
Ok, one question I have is where to start, to be able to most efficiently reach my goal of creating a popular posts field that is working as I want it to?
Should I start with “Learn SQL” up here above. Or should I start by reading the link about phpdelusions? Or should I start by setting up a database and run queries? A bit scattered on the whole “doing things in the right order-thing”
If you want to do things right, I’d definitely take the Learn SQL course. You’ll better understand how SQL and data inside a database work. Then set up your database. Then phpdelusions.
By then you should be able to connect your PHP back-end to your database
Ok, I will post questions here along the way. They are guranteed to arise inside of my mind