Home » Php » database – Are there any issues with always preparing SQL statements with PHP?

database – Are there any issues with always preparing SQL statements with PHP?

Posted by: admin July 12, 2020 Leave a comment

Questions:

Is there any issue with always preparing SQL statements with PHP instead of executing them directly?

Not sure if database system matters, but it’s DB2 on System i.

How to&Answers:

You might take a slight performance hit, if they are real prepared statements and not just emulated in the driver. This is because you will have to make two calls to the database, rather than just one.