limit and fix mysql index

This commit is contained in:
gnieark 2015-11-29 11:25:47 +01:00
parent 812d270e0d
commit 143e59a9ed

View File

@ -112,6 +112,7 @@ function conn_bdd(){
} }
function get_battles_history($game){ function get_battles_history($game){
$game=substr($game,0,8); //limit 8 char for limitting mysql index size
$lnMysql=conn_bdd(); $lnMysql=conn_bdd();
$rs=mysqli_query($lnMysql, $rs=mysqli_query($lnMysql,
" SELECT " SELECT
@ -147,6 +148,7 @@ function get_battles_history($game){
function save_battle($game,$bot1,$bot2,$resultat){ function save_battle($game,$bot1,$bot2,$resultat){
//resultat: 0 match nul, 1 bot1 gagne 2 bot 2 gagne //resultat: 0 match nul, 1 bot1 gagne 2 bot 2 gagne
$game=substr($game,0,8); //limit 8 char for limitting mysql index size
$lnMysql=conn_bdd(); $lnMysql=conn_bdd();
//chercher les id de bot 1 et bot2 //chercher les id de bot 1 et bot2