Hi!
1st: turn on maximal error logging: error_reporing(E_ALL)
2nd: after each call of mysql* function check result value. if value is false, output errors like this:
PHP Code:
<?php
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
if (!$mysqli->query("some query")) {
printf("Error: %s\n", $mysqli->error);
}
?>