I have problems because i don't really know how I can test my code and sql ( mysql ) to see how long SQL queries and PHP functions /code take to run.
Does anyone here know where I can find these tools?
I have problems because i don't really know how I can test my code and sql ( mysql ) to see how long SQL queries and PHP functions /code take to run.
Does anyone here know where I can find these tools?
The search keyword you want is "profiler".
There's several PHP profilers out there; XDebug, PHPEd Profiler, APD, DBG, and PQP, just to name a few.
I've used XDebug on several occasions and though it can be a little annoying to get up and running it does a pretty decent job. Just follow the installations docs and you should be fine.
For PHP code, you can use xdebug for profiling. You'll need a frontend to read the trace data as well. If you're on windows, you can use WinCacheGrind. For other OS'es you can use either kCacheGrind (Lots of features, but a bit scary for beginners) or WebGrind (Much simpler and nicer looking).
For Mysql, you can use maatkit for profiling multiple queries, and to analyse a specific query, you should use EXPLAIN.