par
Invité » 12 juin 2006, 09:46
bonjour je n'etais pas la du week end et je viens de voir vos reponses.
$sql = mysql_query('SELECT * FROM produit INNER JOIN categorie ON categorie.cat_id=produit.cat_id INNER JOIN marque ON marque.mar_id=produit.mar_id WHERE pro_ref =' .$ref. '') or die (mysql_error($sql));
$req = mysql_fetch_array($sql);
il me met ca comme erreur !
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in D:\wamp\www\Dcp\Administration\fiche_produit.php on line 12
pourtant quand je la test sous phpmyadmin cela fonctionne tres tres bien.
j'ai fait un echo du $ref et j'ai la reference produit.
le probleme doit venir de la jointure mais cela n'aurais pas du fonctionner sous phpmyadmin
non ?
merci d'avance chers collegues
bonjour je n'etais pas la du week end et je viens de voir vos reponses.
[php]$sql = mysql_query('SELECT * FROM produit INNER JOIN categorie ON categorie.cat_id=produit.cat_id INNER JOIN marque ON marque.mar_id=produit.mar_id WHERE pro_ref =' .$ref. '') or die (mysql_error($sql));
$req = mysql_fetch_array($sql);[/php]
il me met ca comme erreur !
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in D:\wamp\www\Dcp\Administration\fiche_produit.php on line 12
pourtant quand je la test sous phpmyadmin cela fonctionne tres tres bien.
j'ai fait un echo du $ref et j'ai la reference produit.
le probleme doit venir de la jointure mais cela n'aurais pas du fonctionner sous phpmyadmin
non ?
merci d'avance chers collegues