1> whats the difference between mysql and mysqli type functions ?
The mysql functions lack direct support for some of the newer MySQL features such as prepared statements and transactions. The improved mysql extension has support for object oriented style programming whereas the old mysql extension is more procedurally oriented.
2> which one to use and why ?
If you have a choice, use the mysqli extension due to its added features. If the PDO extension is available, you might want to consider using that instead as it provides a more consistent interface across different database management systems, though it is not an abstraction layer.
3> in some code i found a complex queries operations like
mysqli_prepare()
mysqli_stmt_bind_param()
mysqli_stmt_execute()
mysqli_stmt_bind_result()
functions found basically in OO approach, whats its advance over general mysqli_query(),mysqli_fetch_array() ?
You are looking at portions of the improved mysql interface that support prepared statements. It is not so much an OO approach itself per se (mysqli_query() and mysqli_fetch_array() have their OO style counterparts) but a way to reuse SQL statements with different values without having to re-construct the statements yourself, while providing a better escaping functionality than mysqli_real_escape_string().
4> which type of function is suitable for mysql operations in php5 in relative to performance ?
The choice of database interface in PHP is less of a factor with respect to performance than a well tuned database and optimised queries.