Closed MejorCodigo closed 7 years ago
What kind of version are you reading at? Medoo is using prepare statement for whole SQL execution system since v1.4, and the query()
method is only provided a way to execute the raw query directly for special case. Additionally, query()
is also possible to execute a query with prepare statement like other database framework https://medoo.in/api/query.
Ahh ok, so executing something like $database->select();
will run a prepared statement? @catfan
@ExoSkeleton321 Yes
Oh ok, perfect. Thanks a lot for clearing that up! So far that's the only thing I needed cleared up. Thanks again! :)
Hey guys, there isn't really a problem I'm having but more like a theoretical question. Is this framework well protected against attacks like SQL Injection? If not, what are some ways I can go about protecting my apps against this type of attack using this framework. So far I've been loving this framework but this is something I want to know before continuing to use it for future apps.
I got this question from looking a the actual file and at the requirements, they use the
PDO
extension. I also saw that they use thequery();
method to run their queries. From what I've read it is better to use theprepare();
method to protect against SQL injection. So should I just change thequery();
method to theprepare();
method or does this framework handle this type of attack before the query is ran?This part of the code from the framework:
Thanks guys, any help is appreciated! :)