- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
function sql_ommetr($q,&$dbt,$line)
{
$result = mysql_query($q, $dbt);
if (!$result)
{
if (!mysql_ping($dbt))
{
$dbt = reinit_master_connection();
if (!mysql_ping($dbt))
{
trigger_error(__FILE__.":$line\t".mysql_errno($dbt)."\t".mysql_error($dbt)."\t| 2dieWhen executing: ".preg_replace("/\n+/"," ",$q)."\n",E_USER_WARNING);
die();
}else{
$result = mysql_query($q, $dbt);
if (!$result){
trigger_error(__FILE__.":$line\t".mysql_errno($dbt)."\t".mysql_error($dbt)."\t| 3dieWhen executing: ".preg_replace("/\n+/"," ",$q)."\n",E_USER_WARNING);
die();
}
}
}else{
$result = mysql_query($q, $dbt);
if (!$result){
trigger_error(__FILE__.":$line\t".mysql_errno($dbt)."\t".mysql_error($dbt)."\t| 3dieWhen executing: ".preg_replace("/\n+/"," ",$q)."\n",E_USER_WARNING);
die();
}
}
}
return $result;
}