Re: [requêtes SQL] construction ...
Salut,
Non je n'est pas suivit ton conseil, malgré qu'il soit bon :)
Voici donc ma requète telle quelle est maintenant :
Code PHP :
Pour copier le contenu exact du code,
Veuillez citer le message
<?php
#####!!!#####
-
$req_catvente = reqmysql('SELECT
`vente_categorie`.`id` AS id_categorie,
`vente_categorie`.`id_ref` AS id_ref,
`vente_categorie`.`cat` AS cat_categorie,
`vente_categorie`.`desc`,
`vente_article`.`id` AS id_article,
`vente_article`.`cat` AS cat_article,
`vente_article`.`desc`
FROM `vente_categorie`
LEFT JOIN `vente_article`
ON `vente_categorie`.`id`=`vente_article`.`soucat`
ORDER BY `position` ASC, `sous_position` ASC
');
-
#####!!!#####
?>
Code PHP :
Pour copier le contenu exact du code,
Veuillez citer le message
<?php
#####!!!#####
-
CREATE TABLE IF NOT EXISTS `vente_categorie` (
`id` int(10) unsigned NOT NULL auto_increment,
`id_ref` int(10) NOT NULL default '0',
`cat` text NOT NULL,
`desc` text NOT NULL,
`position` int(2) NOT NULL default '0',
`sous_position` int(2) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-
#####!!!#####
?>
Si ça peut aider :)
A bientôt ^^