Je vien car j'ai un problème de recupération d'info dans ma base Mysql
Explication :
Je voudrais recuperés les mises a jour des infos de mon script news a partir de la base Mysql, j'ai recrée les tables de ma news dans mon fichier index.php Se qui donne en images ca ==>
Citation : Table de départ
Le code qui permet d'afficher se ci, le voila ==>
<code> <table> <tr> <td>
<divid="News"class="news">
<!-- Beginn News Box -->
<tablewidth="100%"cellpadding="2"cellspacing="1"border="0"align="center"valign="top"bgcolor="#232323"> <tr> <tdcolspan="2"width="100%"bgcolor="#ff6000"class="title"align="left"valign="top"style="font-family:Verdana, Tahoma; color:white; font-size:9pt;" nowrap>Test de news 4</td>
</tr><tr> <tdcolspan="2"width="100%"bgcolor="#E5E5E5"class="taba"align="left"valign="top"style="font-family:Verdana, Tahoma; color:#000000; font-size:8pt;"> <brclass="hauteur"><imgsrc="http://image.jeuxvideo.com/images/ds/n/o/novods00z.jpg"border=0><br>Lorsque les écureuils et les fouines se soulèvent, voilà ce que ça donne. <br><br><brclear="right"><br>Lien du test : <atarget="_blank"href="http://"title=""></a><br></td> </tr><tr> <tdwidth="100%"bgcolor="#006699"class="cat"align="left"valign="top" nowrap> <tablewidth="100%"cellpadding="0"cellspacing="0"border="0"><tr>
</tr></table> </td></tr></table><br> <!-- Ende News Box --> </div>
</td> <td>
<divid="News"class="news">
<!-- Beginn News Box -->
<tablewidth="100%"cellpadding="2"cellspacing="1"border="0"align="center"valign="top"bgcolor="#232323"> <tr> <tdcolspan="2"width="100%"bgcolor="#ff6000"class="title"align="left"valign="top"style="font-family:Verdana, Tahoma; color:white; font-size:9pt;" nowrap>Test de news</td> </tr><tr> <tdcolspan="2"width="100%"bgcolor="#E5E5E5"class="taba"align="left"valign="top"style="font-family:Verdana, Tahoma; color:#000000; font-size:8pt;"> <brclass="hauteur"><imgsrc="http://image.jeuxvideo.com/images/dossiers/00006712/00006712_00z.jpg"border=0><br>Arrimez votre estomac si vous tenez à survivre au plus remuant des FPS. <br><br><brclear="right"><br>Lien du test : <atarget="_blank"href="http://www.morphdown.net/"title="BSX-Design">BSX-Design</a><br></td> </tr><tr> <tdwidth="100%"bgcolor="#006699"class="cat"align="left"valign="top" nowrap> <tablewidth="100%"cellpadding="0"cellspacing="0"border="0"><tr>
</tr></table> </td></tr></table><br>
<!-- Ende News Box --> </div>
</td> </tr> </table>
<table> <tr> <td> <divid="News"class="news">
<!-- Beginn News Box -->
<tablewidth="100%"cellpadding="2"cellspacing="1"border="0"align="center"valign="top"bgcolor="#232323"> <tr> <tdcolspan="2"width="100%"bgcolor="#ff6000"class="title"align="left"valign="top"style="font-family:Verdana, Tahoma; color:white; font-size:9pt;" nowrap>Test de news</td> </tr><tr> <tdcolspan="2"width="100%"bgcolor="#E5E5E5"class="taba"align="left"valign="top"style="font-family:Verdana, Tahoma; color:#000000; font-size:8pt;"> <brclass="hauteur"><imgsrc="http://image.jeuxvideo.com/images/p2/s/d/sdbzp200z.jpg"border=0><br>Bien loin de légitimer son superlatif, le nouveau DBZ nous arrive enfin sur PS2. <br><br><brclear="right"><br>Lien du test : <atarget="_blank"href="http://www.morphdown.net/"title="BSX-Design">BSX-Design</a><br></td> </tr><tr> <tdwidth="100%"bgcolor="#006699"class="cat"align="left"valign="top" nowrap> <tablewidth="100%"cellpadding="0"cellspacing="0"border="0"><tr>
</tr></table> </td></tr></table><br>
<!-- Ende News Box --> </div>
</td> <td>
<divid="News"class="news">
<tablewidth="100%"cellpadding="2"cellspacing="1"border="0"align="center"valign="top"bgcolor="#232323"> <tr> <tdcolspan="2"width="100%"bgcolor="#ff6000"class="title"align="left"valign="top"style="font-family:Verdana, Tahoma; color:white; font-size:9pt;" nowrap>Test de news</td> </tr><tr>
<tdcolspan="2"width="100%"bgcolor="#E5E5E5"class="taba"align="left"valign="top"style="font-family:Verdana, Tahoma; color:#000000; font-size:8pt;"> <brclass="hauteur"><imgsrc="http://image.jeuxvideo.com/images/pc/d/a/daonpc00z.jpg"border=0><br>Prenez les commandes d un vaisseau spatial et participez à une guerre intergalactique. <br><br><brclear="right"><br>Lien du test : <atarget="_blank"href="http://www.morphdown.net/"title="BSX-Design">BSX-Design</a><br></td> </tr><tr> <tdwidth="100%"bgcolor="#006699"class="cat"align="left"valign="top" nowrap> <tablewidth="100%"cellpadding="0"cellspacing="0"border="0"><tr>
</tr></table> </td></tr></table><br>
<!-- Ende News Box --> </div>
</td> </tr>
</table>
</ul>
Ensuite je vais modifier la premier table ==> et voila se qui se passe :
Un exemple de script serait le bienvenue
Sinan eu, bha pour se qu'il en est des tables.
Je pense que se n'est pas possible, Vu que une table = un encadrement donc une news donc y'orais que une news et je ne pourrais pas ranger comme je veux mes news
Bha oui moi je parle des base mysql,
En faite je voudrais grace a mon fichier php chercher les info de ma base mysql racoordé au fichier index.php pour pouvoir mettre a jour mon script news au panneau de configuration du system de news...
Le cours sur mon probleme est la ==> http://www.siteduzero.com/tuto-3-140-1-lire-des-donnees.html
Mes ca ne marche pas car au lieu de recupérer une info sur mes tables ca recuperer tout, donc par ex je voudrais mettre a jour, le titre de ma news j'utiliserais cette fonction ex :
Citation : Fetch
<?php
mysql_connect("localhost", "", ""); // Connexion à MySQL
mysql_select_db(""); // Sélection de la base coursphp
$reponse = mysql_query("SELECT * FROM title"); // Requête SQL
// On fait une boucle pour lister tout ce que contient la table :
while ($donnees = mysql_fetch_array($reponse) )
{
?>
Mais ca affiche tout se quil ya dans la table et ca duplique {=index.php>les tables} de mon script news >>>
ok merci mes ces pas ca qui va résoudre mon probleme
Problème recupération de données
× Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
× Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
http://www.encheres-cents.com - http://www.checkmycomposer.com