Linux lhjmq-records 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64
Your IP : 18.117.101.7
<?
$test = "false";
echo "yes = " . $test;
// 20060830 sb@netsimplify: Include MySQL master configuration
if ($test == "true") {
$mysql_host = "mysql-readwrite"; // master (Rum)
$mysql_user = "lhjmq";
$mysql_pass = "45GhiLk19cQ";
} else {
$mysql_host = "mysql-readonly"; // slave (Gin)
$mysql_user = "lhjmq_readonly";
$mysql_pass = "45GhiLk19cQ";
}
$mysql_db = "lhjmq_pii";
//$stat_db = "lhjmqstats_pii";
//Connection to database
// 20060830 sb@netsimplify
$mysql_link = mysql_connect("$mysql_host", "$mysql_user", "$mysql_pass");
if(!$mysql_link){
//Display an error message
echo "Error connecting to mysql server, contact web administrator or try again later!";
exit();
}
//Select the database
if(!mysql_select_db("$mysql_db", $mysql_link)){
//Display an error message
echo "Error selecting database on mysql server, contact web administrator or try again later!";
exit();
}
//Set the character sets
mysql_query('SET character_set_results = latin1', $mysql_link);
mysql_query('SET character_set_client = latin1', $mysql_link);
$sql_search = "SELECT * FROM `parties_events` WHERE id_partie_event =2928475";
echo $sql_search ;
$result_positions = mysql_query($sql_search, $mysql_link);
while($result_position = mysql_fetch_assoc($result_positions)){
echo "<br>record = ".$result_position['minutes']."<br>";
}
/*
$sql = "SELECT JOU FROM $tablename[$x] WHERE 1";
$joueur_ids = mysql_query($sql, $mysql_link);
//echo "sql1 = ".$sql."<br>";
while($joueur_id = mysql_fetch_assoc($joueur_ids)){
$sql_search = "SELECT rh.id AS ident_id, rh.id_register, rh.sys_date, rh.histo_type, rh.histo_status, rh.histo_directdata, rh.histo_addeddata, rh.histo_addeddata2, tpos.description_fr, tpos.description_en
FROM register_histo AS rh
LEFT JOIN types_positions AS tpos ON tpos.id_type_pos = rh.histo_addeddata
WHERE rh.id_register
IN ( $joueur_id[JOU] )
AND rh.histo_type
IN ( 2, 5 )
AND sys_date <= '$saisonenddate'
AND description_en <> '-'
AND description_en IS NOT NULL
ORDER BY rh.sys_date, rh.id
LIMIT 1";
$mysql_link2 = mysql_connect('72.55.128.7', 'Lhcarranza', '899357');
mysql_select_db('lhjmq_pii', $mysql_link2);
$result_positions = mysql_query($sql_search, $mysql_link2);
//echo "sql2 = ".$sql_search."<br>";
while($result_position = mysql_fetch_assoc($result_positions)){
$sqlupdate = "Update $tablename[$x] set POS = '$result_position[description_en]' where JOU = $joueur_id[JOU]";
echo "Joueur : $joueur_id[JOU] => POS = '$result_position[description_en]'";
$mysql_link = mysql_connect('72.55.128.7', 'Lhcarranza', '899357');
mysql_select_db('lhjmqstats_pii', $mysql_link);
mysql_query($sqlupdate, $mysql_link);
echo "sql2 = ".$sqlupdate."<br>";
}
*/
?>
|