Erreur pour importer donnée mysql
Bonjour,
voila mon code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| <?php
// requête
$connect = mysql_connect('localhost', 'root','nucleus','maj-news') or die('Impossible de se connecter : ' . mysql_error());
mysql_select_db($connect);
$envoi=mysql_query("SELECT (titre, soustitre) FROM maj-news ", $connect);
// début du tableau ( hors boucle )
echo "<table width=\"300\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"2\"> \n";
// début de la boucle
while($tableau=mysql_fetch_array($envoi)) {
echo "<tr> \n";
echo "<td width=\"42\" align=\"left\" valign=\"top\" bgcolor=\"#D0DCB4\">".$tableau["soustitre"]."</td> \n";
echo "<td width=\"258\" align=\"left\" valign=\"top\" bgcolor=\"#D0DCB4\">".$tableau["titre"]."</td> \n";
echo "</tr> \n";
}
// fin du tableau html ( hors boucle )
echo "</table> \n";
?> |
et j'obtiens l'erreur : " mysql_fetch_array(): supplied argument is not a valid MySQL "
Je ne comprend pas, cela vient-il de ma requete ou de la synthaxe de la fonction mysql_fetch_array ?8O
Merci