par
Cyrano » 27 mai 2007, 21:49
Ben supprime la dernière clause WHERE et traite le retour dans une boucle, tout simplement :
<?php
$sqlequ = 'select tb_cat_photo.id_cat_photo, tb_cat_photo.cat, tb_photos.id, tb_photos.photo_p, tb_photos.photo_g, tb_photos.commentaire, tb_photos.nom_fichier, tb_photos.visible, tb_photos.id_cat_photo
from tb_cat_photo, tb_photos
where tb_photos.id_cat_photo = tb_cat_photo.id_cat_photo';
if ($resselectequ = mysql_query($sqlequ))
{
while(false != ($selectequ = mysql_fetch_array($resselectequ)))
{
/* Tout se trouve maintenant dans $selectequ, donc $selectequ['tb_cat_photo'], etc... */
}
}
?>
Ben supprime la dernière clause WHERE et traite le retour dans une boucle, tout simplement :
[php]<?php
$sqlequ = 'select tb_cat_photo.id_cat_photo, tb_cat_photo.cat, tb_photos.id, tb_photos.photo_p, tb_photos.photo_g, tb_photos.commentaire, tb_photos.nom_fichier, tb_photos.visible, tb_photos.id_cat_photo
from tb_cat_photo, tb_photos
where tb_photos.id_cat_photo = tb_cat_photo.id_cat_photo';
if ($resselectequ = mysql_query($sqlequ))
{
while(false != ($selectequ = mysql_fetch_array($resselectequ)))
{
/* Tout se trouve maintenant dans $selectequ, donc $selectequ['tb_cat_photo'], etc... */
}
}
?>[/php]