Php/sql

Résolu
johnmichel57 Messages postés 23 Date d'inscription mercredi 15 juin 2005 Statut Membre Dernière intervention 27 juin 2005 - 21 juin 2005 à 17:26
cs_Anthomicro Messages postés 9433 Date d'inscription mardi 9 octobre 2001 Statut Membre Dernière intervention 13 avril 2007 - 21 juin 2005 à 17:41
bonjour, voila jai un script mais je n'arrive pas a trouver l'erreur dans ces ligne (erreur parse)

if ($tri= "V1");
$sql = 'SELECT * FROM enregistrement ORDER BY id';
else if ($tri= "V2");
$sql = "SELECT * FROM enregistrement ORDER BY nom";

4 réponses

cs_Anthomicro Messages postés 9433 Date d'inscription mardi 9 octobre 2001 Statut Membre Dernière intervention 13 avril 2007 8
21 juin 2005 à 17:34
Salut,



if ($tri= =='V1')

{

$sql = 'SELECT * FROM enregistrement ORDER BY id';

}

else if ($tri= =='V2')

{

$sql = "SELECT * FROM enregistrement ORDER BY nom";

}

a +
<hr size="2" width="100%">




<li>Entraide, dépannage et vulgarisation informatique: Mon site de vulgarisation informatique</li>
3
coucou747 Messages postés 12303 Date d'inscription mardi 10 février 2004 Statut Membre Dernière intervention 30 juillet 2012 44
21 juin 2005 à 17:35
il met quoi comme erreur ?
In a dream, I saw me, drop dead... U was here, U cried... It was just a deam, if I die, U won't cry, maybe, U'll be happy

[url]http://coucou747.hopto.org/url
0
coucou747 Messages postés 12303 Date d'inscription mardi 10 février 2004 Statut Membre Dernière intervention 30 juillet 2012 44
21 juin 2005 à 17:35
oh oui, trop con comme erreur...
In a dream, I saw me, drop dead... U was here, U cried... It was just a deam, if I die, U won't cry, maybe, U'll be happy

[url]http://coucou747.hopto.org/url
0
cs_Anthomicro Messages postés 9433 Date d'inscription mardi 9 octobre 2001 Statut Membre Dernière intervention 13 avril 2007 8
21 juin 2005 à 17:41
lol

<hr size="2" width="100%">




<li>Entraide, dépannage et vulgarisation informatique: Mon site de vulgarisation informatique</li>
0
Rejoignez-nous