In this slim framework tutorial, we’ll be connecting our API to a MySQL database. Then, we’re going to be selecting a bunch of data from our database and …
Original source
In this slim framework tutorial, we’ll be connecting our API to a MySQL database. Then, we’re going to be selecting a bunch of data from our database and …
Original source
22 responses to “Slim framework tutorial | part 4 : fetching data from MySQL”
this is amazing, thank you!
I actually had fun watching it 🙂
Nice!
+David Conelly, thanks for the videos.
I've liked them all so far and subscribed.
I love how happy and upbeat you are.
Shall watch again. 🙂
not working – i get: "Slim Application Error
A website error has occurred. Sorry for the temporary inconvenience." after requiring dbconnect.php
How if GET methode with two or three variables??
Example :
I want to load data from table which need two parameter,
SELECT * FROM study WHERE level=1 AND LessonID='a'
thanks..
thnk u sir ..i just got stucked in slim with that PDO thing u really helped me thnks a lot
actually you need to set header content type in order to inform the consumer application what's the "content", thank you very much for the this set of tutorials. I am a big fan of PHP and I've learned a few things! Before I forget the use of PDO is about database detachment yes but also a matter of security such as SQL injection.
Hello! I was wonder, will you be using Twig in this course? Because I am trying to get data from my database, but I want to show the data using twig instead of simply using PHP and echoing the data in the route. Thanks for the course!
Aye Aye 😀
Nice video David. There's a difference between an ORM and a Framework. Doctrine, Redbean, Idiorm, NOSQL are all ORM's. Codeigniter, Cake are Frameworks. These frameworks also have ORM on them. The ORM's implement Active Record which and uses PDO usually behing the sceans. It really makes my like easier as a developer. It also provides prepared statements automatically which eliminates security issues. My personal favorite is Idiorm & Paris. Just my two cents!
Active Record
https://martinfowler.com/eaaCatalog/activeRecord.html
Idiorm & Paris
http://j4mie.github.io/idiormandparis/
Thanks David 🙂
thanks,very helpful
Aye it's Approve by Dere k! finaly now i got heavy reasons to use PDO ^.^
Hi, your reasoning for choosing MySQLi over PDO, is all wrong, its not about whether the db will change or not – as you say this so rarely happens.
It's more to do with the direction of the web and how its consumed, speed and security are paramount. PDO has prepared statements and SQL Injection protection built-in, your example does not.
I appreciate your efforts to inform and educate, but please do so with the best intentions for future development and prepare those who wish to learn a more reasoned and accurate starting point.
Thank you
I am tryng to connect to a database with PDO. Really confused to how to do it, any help appreciated!
This is exactly what I was looking for, simple and straight forward … thank you so much
AYE AYE!
I get a "Fatal error: Uncaught Error: Call to a member function get() on null in " when I do this tutorial, can't get away
you are great ,, really make it simple and funny ,, you must know you are great teacher
Wow , This's powerful tutorial Thank you very much !!
Nice! That's great and simple~