par
mbk28 » 23 déc. 2013, 12:21
justement, comme je connaissais le problème avec la rubrique année, je l'ai saisi sous forme texte: coll_annee, donc normalement ce code généré par DW ne devrait pas poser de problème:
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_jo, $jo);
$query_RSbillet = "SELECT * FROM coll_billet, coll_jeux, coll_jour, coll_sport WHERE coll_billet.coll_kf_jeux=coll_jeux.coll_kp_jeux AND coll_billet.coll_kf_jour=coll_jour.coll_kp_jour AND coll_billet.coll_kf_sport=coll_sport.coll_kp_sport ORDER BY coll_billet.coll_kf_jeux, coll_billet.coll_kf_jour, coll_billet.coll_horaire";
$RSbillet = mysql_query($query_RSbillet, $ab) or die(mysql_error());
$row_RSbillet = mysql_fetch_assoc($RSbillet);
$totalRows_RSbillet = mysql_num_rows($RSbillet);
?>
justement, comme je connaissais le problème avec la rubrique année, je l'ai saisi sous forme texte: [i]coll_annee[/i], donc normalement ce code généré par DW ne devrait pas poser de problème:
[i]<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_jo, $jo);
$query_RSbillet = "SELECT * FROM coll_billet, coll_jeux, coll_jour, coll_sport WHERE coll_billet.coll_kf_jeux=coll_jeux.coll_kp_jeux AND coll_billet.coll_kf_jour=coll_jour.coll_kp_jour AND coll_billet.coll_kf_sport=coll_sport.coll_kp_sport ORDER BY coll_billet.coll_kf_jeux, coll_billet.coll_kf_jour, coll_billet.coll_horaire";
$RSbillet = mysql_query($query_RSbillet, $ab) or die(mysql_error());
$row_RSbillet = mysql_fetch_assoc($RSbillet);
$totalRows_RSbillet = mysql_num_rows($RSbillet);
?>[/i]