par
choubx » 02 sept. 2007, 18:28
hello et merci de ta reponse @rthur,
j'ai trouve la fonction qui se cachait dans un fichier. elle est definie comme suit:
function tep_db_query($query, $link = 'db_link') {
global $$link;
if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
error_log('QUERY ' . $query . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
}
$_start = explode(' ', microtime());
$result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error());
$_end = explode(' ', microtime());
$_time = number_format(($_end[1] + $_end[0] - ($_start[1] + $_start[0])), 8);
if ( defined('EXPLAIN_QUERIES') && (EXPLAIN_QUERIES == 'true') ){
/* Initially set to store every query */
$explain_this_query = true;
/* If the include filter is true just explain queries for those scripts */
if ( defined('EXPLAIN_USE_INCLUDE') && (EXPLAIN_USE_INCLUDE == 'true') ){
$explain_this_query = ( ( stripos( EXPLAIN_INCLUDE_FILES, basename($_SERVER['PHP_SELF']) ) ) === false ? false : true );
}
/* If the exclude filter is true just explain queries for those that are not listed */
if ( defined('EXPLAIN_USE_EXCLUDE') && (EXPLAIN_USE_EXCLUDE == 'true') ){
$explain_this_query = ( ( stripos( EXPLAIN_EXCLUDE_FILES, basename($_SERVER['PHP_SELF']) ) ) === false ? true : false );
}
/* If it still true after running it through the filters store it */
if ($explain_this_query) tep_explain_query($query, $_time);
} # End if EXPLAIN_QUERIES
if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
$result_error = mysql_error();
error_log('RESULT ' . $result . ' ' . $result_error . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
}
return $result;
}
je vois bien que les erreurs doivent s'afficher a l'ecran en lisant le code mais ca ne marche pas...
qq un aurait une suggestion svp?
merci!
hello et merci de ta reponse @rthur,
j'ai trouve la fonction qui se cachait dans un fichier. elle est definie comme suit:
[php] function tep_db_query($query, $link = 'db_link') {
global $$link;
if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
error_log('QUERY ' . $query . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
}
$_start = explode(' ', microtime());
$result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error());
$_end = explode(' ', microtime());
$_time = number_format(($_end[1] + $_end[0] - ($_start[1] + $_start[0])), 8);
if ( defined('EXPLAIN_QUERIES') && (EXPLAIN_QUERIES == 'true') ){
/* Initially set to store every query */
$explain_this_query = true;
/* If the include filter is true just explain queries for those scripts */
if ( defined('EXPLAIN_USE_INCLUDE') && (EXPLAIN_USE_INCLUDE == 'true') ){
$explain_this_query = ( ( stripos( EXPLAIN_INCLUDE_FILES, basename($_SERVER['PHP_SELF']) ) ) === false ? false : true );
}
/* If the exclude filter is true just explain queries for those that are not listed */
if ( defined('EXPLAIN_USE_EXCLUDE') && (EXPLAIN_USE_EXCLUDE == 'true') ){
$explain_this_query = ( ( stripos( EXPLAIN_EXCLUDE_FILES, basename($_SERVER['PHP_SELF']) ) ) === false ? true : false );
}
/* If it still true after running it through the filters store it */
if ($explain_this_query) tep_explain_query($query, $_time);
} # End if EXPLAIN_QUERIES
if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
$result_error = mysql_error();
error_log('RESULT ' . $result . ' ' . $result_error . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
}
return $result;
}
[/php]
je vois bien que les erreurs doivent s'afficher a l'ecran en lisant le code mais ca ne marche pas... :(
qq un aurait une suggestion svp?
merci!