Salut
Mon souci est le suivant ma requete fonction nickel en local 'easy php' mais une fois sur le net (one&one) ca ne fonctionne plus. Je pense que c'est du fait quecertains champs soient vides (champ Version1) dans concat ... Quelqu'un aurait-il une solution? L'idéal serait d'agire directement sur la requete. Voici mon code:
<?php require_once('../Connections/DISQUES.php'); ?>
<?php
// VIDER TABLE titresjjg
mysql_select_db($database_DISQUES, $DISQUES);
$sql = "TRUNCATE TABLE titresjjg";
mysql_query($sql) or die(mysql_error());
?>
<?php
// ouverture de la connexion
//$connexion = mysql_connect($hostname_DISQUES,$username_DISQUES,$password_DISQUES);
// choix de la base CD_test
mysql_select_db($database_DISQUES, $DISQUES);
// constitution de la requête
$requete="INSERT INTO titresjjg (Titre_concat, Titre, Version, AC, Titre_disque, Artiste, Annee, NUM_DISQUE, Support) SELECT CONCAT(titre1,Version1,AC1), titre1, Version1, AC1, Titre_disque, Artiste, Annee, NUM_DISQUE, Support FROM disques_liste GROUP BY Titre_concat ORDER BY Support,Artiste,Annee";
mysql_query($requete,$DISQUES);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Document sans titre</title>
<style type="text/css">
<!--
body,td,th {
color: #000000;
}
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: none;
color: #000000;
}
a:active {
text-decoration: none;
color: #000000;
}
.Style2 {
font-size: 18px;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
.Style3 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
}
.Style4 {color: #000000}
.Style5 {font-size: 18px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000; }
-->
</style></head>
<body>
<p align="center" class="Style3"><span class="Style5">AJOUTER LES TITRES DANS LA BASE ?</span></p>
<p align="center" class="Style2"><span class="Style4"><a href="new_liste_titresjjg.php">>></a></span></p>
</body>
</html>