Requete sur base et retour réponse
Hors ligneByld Le 12/07/2005 à 21:21 Profil de Byld Configuration de Byld

Bonjour à tous.
Je savais que j'aurais encore besoin de vos services à tous
Dans ma base de données SPIP j'ai une table SPIP_AUTEURS.
Je voudrais interroger cette table et pouvoir recevoir l'id_auteur correspondant à  la personne connectée.
Je ne sais pas faire..
Auriez vous une petite idée ou id? (jeu de mots)
Juste un petit truc en php que je pourrais glisser dans ma page?
Merci d'avance...
Hors ligneAnthony Le 12/07/2005 à 22:02 Profil de Anthony Configuration de Anthony

Admin
Salut byld

Peux-tu nous donner la structure de ta table (va dans PhpMyAdmin par exemple et colle ici la structure de ta table) afin qu'on puisse t'aider.

a +
--

Hors ligneByld Le 12/07/2005 à 23:03 Profil de Byld Configuration de Byld

Etant , je n'arrive pas à faire un copier coller de la table, le résultat est incohérant, tout est mélangé...Comment dois-je m'y prendre? j'ai tenté une capture ecran mais l'image est trop grande et trop lourde pour passer ici...Si tu veux voir mail moi, je te donnerai mes pass pour que tu ailles voir si tu veux...J'ai confaince en toi
Hors ligneAnthony Le 12/07/2005 à 23:27 Profil de Anthony Configuration de Anthony

Admin
Tu cliques sur "exporter" et ensuite tu coches "structure" tu décoches "données" et tu colles le contenu du fichier texte.
--

Hors ligneByld Le 12/07/2005 à 23:39 Profil de Byld Configuration de Byld

Pfffuuu! Doit être fatigué le Byld! c'est evident, je l'ai fait plusieurs fois et notamment pour mes sauvegardes! Bref passons sur ma nullité j'éspère passagère
Voilà ci joint le fichier texte de la structure de ma base..
Merci encore d'aider un gars qui a le cerveau ramolli par toutes les questions qu'il se pose
-------------------------------------------------
# phpMyAdmin MySQL-Dump
# version 2.2.1-dev
# http://phpwizard.net/phpMyAdmin/
# http://phpmyadmin.sourceforge.net/ (download page)
#
# Serveur: members-paid-l.db.lyceu.net:3320
# Généré le : Mardi 12 Août 2005 à 23:33
# Version du serveur: 3.23.33
# Version de PHP: 4.3.2
# Base de données: `la-plume-et-lencrier_com_1`
# --------------------------------------------------------

#
# Structure de la table `spip_articles`
#

CREATE TABLE spip_articles (
  id_article bigint(21) NOT NULL auto_increment,
  surtitre text NOT NULL,
  titre text NOT NULL,
  soustitre text NOT NULL,
  id_rubrique bigint(21) NOT NULL default '0',
  descriptif text NOT NULL,
  chapo mediumtext NOT NULL,
  texte longblob NOT NULL,
  ps mediumtext NOT NULL,
  date datetime NOT NULL default '0000-00-00 00:00:00',
  statut varchar(10) NOT NULL default '0',
  id_secteur bigint(21) NOT NULL default '0',
  maj timestamp(14) NOT NULL,
  export varchar(10) default 'oui',
  date_redac datetime NOT NULL default '0000-00-00 00:00:00',
  visites int(11) NOT NULL default '0',
  referers int(11) NOT NULL default '0',
  popularite double NOT NULL default '0',
  accepter_forum char(3) NOT NULL default '',
  auteur_modif bigint(21) NOT NULL default '0',
  date_modif datetime NOT NULL default '0000-00-00 00:00:00',
  lang varchar(10) NOT NULL default '',
  langue_choisie char(3) default 'non',
  id_trad bigint(21) NOT NULL default '0',
  nom_site tinytext NOT NULL,
  url_site varchar(255) NOT NULL default '',
  extra longblob,
  idx enum('','1','non','oui','idx') NOT NULL default '',
  id_version int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (id_article),
  KEY id_rubrique (id_rubrique),
  KEY id_secteur (id_secteur),
  KEY id_trad (id_trad),
  KEY lang (lang),
  KEY statut (statut,date),
  KEY url_site (url_site),
  KEY date_modif (date_modif),
  KEY idx (idx)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_auteurs`
#

CREATE TABLE spip_auteurs (
  id_auteur bigint(21) NOT NULL auto_increment,
  nom text NOT NULL,
  bio text NOT NULL,
  email tinytext NOT NULL,
  nom_site tinytext NOT NULL,
  url_site text NOT NULL,
  login varchar(255) binary NOT NULL default '',
  pass tinytext NOT NULL,
  low_sec tinytext NOT NULL,
  statut varchar(255) NOT NULL default '',
  maj timestamp(14) NOT NULL,
  pgp blob NOT NULL,
  htpass tinyblob NOT NULL,
  en_ligne datetime NOT NULL default '0000-00-00 00:00:00',
  imessage char(3) NOT NULL default '',
  messagerie char(3) NOT NULL default '',
  alea_actuel tinytext NOT NULL,
  alea_futur tinytext NOT NULL,
  prefs tinytext NOT NULL,
  cookie_oubli tinytext NOT NULL,
  source varchar(10) NOT NULL default 'spip',
  lang varchar(10) NOT NULL default '',
  extra longblob,
  idx enum('','1','non','oui','idx') NOT NULL default '',
  PRIMARY KEY  (id_auteur),
  KEY login (login),
  KEY statut (statut),
  KEY lang (lang),
  KEY en_ligne (en_ligne),
  KEY idx (idx)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_auteurs_articles`
#

CREATE TABLE spip_auteurs_articles (
  id_auteur bigint(21) NOT NULL default '0',
  id_article bigint(21) NOT NULL default '0',
  KEY id_auteur (id_auteur),
  KEY id_article (id_article)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_auteurs_messages`
#

CREATE TABLE spip_auteurs_messages (
  id_auteur bigint(21) NOT NULL default '0',
  id_message bigint(21) NOT NULL default '0',
  vu char(3) NOT NULL default '',
  KEY id_auteur (id_auteur),
  KEY id_message (id_message)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_auteurs_rubriques`
#

CREATE TABLE spip_auteurs_rubriques (
  id_auteur bigint(21) NOT NULL default '0',
  id_rubrique bigint(21) NOT NULL default '0',
  KEY id_auteur (id_auteur),
  KEY id_rubrique (id_rubrique)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_breves`
#

CREATE TABLE spip_breves (
  id_breve bigint(21) NOT NULL auto_increment,
  date_heure datetime NOT NULL default '0000-00-00 00:00:00',
  titre text NOT NULL,
  texte longblob NOT NULL,
  lien_titre text NOT NULL,
  lien_url text NOT NULL,
  statut varchar(6) NOT NULL default '',
  id_rubrique bigint(21) NOT NULL default '0',
  lang varchar(10) NOT NULL default '',
  langue_choisie char(3) default 'non',
  maj timestamp(14) NOT NULL,
  extra longblob,
  idx enum('','1','non','oui','idx') NOT NULL default '',
  PRIMARY KEY  (id_breve),
  KEY id_rubrique (id_rubrique),
  KEY idx (idx)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_documents`
#

CREATE TABLE spip_documents (
  id_document bigint(21) NOT NULL auto_increment,
  id_vignette bigint(21) NOT NULL default '0',
  id_type bigint(21) NOT NULL default '0',
  titre text NOT NULL,
  date datetime NOT NULL default '0000-00-00 00:00:00',
  descriptif text NOT NULL,
  fichier varchar(255) NOT NULL default '',
  taille int(11) NOT NULL default '0',
  largeur int(11) NOT NULL default '0',
  hauteur int(11) NOT NULL default '0',
  mode enum('vignette','document') NOT NULL default 'vignette',
  inclus char(3) default 'non',
  maj timestamp(14) NOT NULL,
  PRIMARY KEY  (id_document),
  KEY id_vignette (id_vignette),
  KEY mode (mode),
  KEY id_type (id_type)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_documents_articles`
#

CREATE TABLE spip_documents_articles (
  id_document bigint(21) NOT NULL default '0',
  id_article bigint(21) NOT NULL default '0',
  KEY id_document (id_document),
  KEY id_article (id_article)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_documents_breves`
#

CREATE TABLE spip_documents_breves (
  id_document bigint(21) NOT NULL default '0',
  id_breve bigint(21) NOT NULL default '0',
  KEY id_document (id_document),
  KEY id_breve (id_breve)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_documents_rubriques`
#

CREATE TABLE spip_documents_rubriques (
  id_document bigint(21) NOT NULL default '0',
  id_rubrique bigint(21) NOT NULL default '0',
  KEY id_document (id_document),
  KEY id_rubrique (id_rubrique)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_forum`
#

CREATE TABLE spip_forum (
  id_forum bigint(21) NOT NULL auto_increment,
  id_parent bigint(21) NOT NULL default '0',
  id_rubrique bigint(21) NOT NULL default '0',
  id_article bigint(21) NOT NULL default '0',
  id_breve bigint(21) NOT NULL default '0',
  date_heure datetime NOT NULL default '0000-00-00 00:00:00',
  titre text NOT NULL,
  texte mediumtext NOT NULL,
  auteur text NOT NULL,
  email_auteur text NOT NULL,
  nom_site text NOT NULL,
  url_site text NOT NULL,
  statut varchar(8) NOT NULL default '',
  idx enum('','1','non','oui','idx') NOT NULL default '',
  ip varchar(16) default NULL,
  maj timestamp(14) NOT NULL,
  id_auteur bigint(20) NOT NULL default '0',
  id_message bigint(21) NOT NULL default '0',
  id_syndic bigint(21) NOT NULL default '0',
  PRIMARY KEY  (id_forum),
  KEY id_parent (id_parent),
  KEY id_rubrique (id_rubrique),
  KEY id_article (id_article),
  KEY id_breve (id_breve),
  KEY id_message (id_message),
  KEY id_syndic (id_syndic),
  KEY statut (statut,date_heure),
  KEY idx (idx)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_forum_cache`
#

CREATE TABLE spip_forum_cache (
  id_forum bigint(21) NOT NULL default '0',
  id_rubrique bigint(21) NOT NULL default '0',
  id_article bigint(21) NOT NULL default '0',
  id_breve bigint(21) NOT NULL default '0',
  id_syndic bigint(21) NOT NULL default '0',
  fichier char(150) binary NOT NULL default '',
  maj timestamp(14) NOT NULL,
  PRIMARY KEY  (fichier,id_forum,id_article,id_rubrique,id_breve,id_syndic),
  KEY id_forum (id_forum),
  KEY id_rubrique (id_rubrique),
  KEY id_article (id_article),
  KEY id_syndic (id_syndic),
  KEY id_breve (id_breve)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_groupes_mots`
#

CREATE TABLE spip_groupes_mots (
  id_groupe bigint(21) NOT NULL auto_increment,
  titre text NOT NULL,
  unseul char(3) NOT NULL default '',
  obligatoire char(3) NOT NULL default '',
  articles char(3) NOT NULL default '',
  breves char(3) NOT NULL default '',
  rubriques char(3) NOT NULL default '',
  syndic char(3) NOT NULL default '',
  0minirezo char(3) NOT NULL default '',
  1comite char(3) NOT NULL default '',
  6forum char(3) NOT NULL default '',
  maj timestamp(14) NOT NULL,
  PRIMARY KEY  (id_groupe)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_index_articles`
#

CREATE TABLE spip_index_articles (
  hash bigint(20) unsigned NOT NULL default '0',
  points int(10) unsigned NOT NULL default '0',
  id_article int(10) unsigned NOT NULL default '0',
  KEY hash (hash),
  KEY id_article (id_article)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_index_auteurs`
#

CREATE TABLE spip_index_auteurs (
  hash bigint(20) unsigned NOT NULL default '0',
  points int(10) unsigned NOT NULL default '0',
  id_auteur int(10) unsigned NOT NULL default '0',
  KEY hash (hash),
  KEY id_auteur (id_auteur)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_index_breves`
#

CREATE TABLE spip_index_breves (
  hash bigint(20) unsigned NOT NULL default '0',
  points int(10) unsigned NOT NULL default '0',
  id_breve int(10) unsigned NOT NULL default '0',
  KEY hash (hash),
  KEY id_breve (id_breve)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_index_dico`
#

CREATE TABLE spip_index_dico (
  hash bigint(20) unsigned NOT NULL default '0',
  dico varchar(30) NOT NULL default '',
  PRIMARY KEY  (dico)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_index_forum`
#

CREATE TABLE spip_index_forum (
  hash bigint(20) unsigned NOT NULL default '0',
  points int(10) unsigned NOT NULL default '0',
  id_forum int(10) unsigned NOT NULL default '0',
  KEY hash (hash),
  KEY id_forum (id_forum)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_index_mots`
#

CREATE TABLE spip_index_mots (
  hash bigint(20) unsigned NOT NULL default '0',
  points int(10) unsigned NOT NULL default '0',
  id_mot int(10) unsigned NOT NULL default '0',
  KEY hash (hash),
  KEY id_mot (id_mot)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_index_rubriques`
#

CREATE TABLE spip_index_rubriques (
  hash bigint(20) unsigned NOT NULL default '0',
  points int(10) unsigned NOT NULL default '0',
  id_rubrique int(10) unsigned NOT NULL default '0',
  KEY hash (hash),
  KEY id_rubrique (id_rubrique)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_index_signatures`
#

CREATE TABLE spip_index_signatures (
  hash bigint(20) unsigned NOT NULL default '0',
  points int(10) unsigned NOT NULL default '0',
  id_signature int(10) unsigned NOT NULL default '0',
  KEY hash (hash),
  KEY id_signature (id_signature)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_index_syndic`
#

CREATE TABLE spip_index_syndic (
  hash bigint(20) unsigned NOT NULL default '0',
  points int(10) unsigned NOT NULL default '0',
  id_syndic int(10) unsigned NOT NULL default '0',
  KEY hash (hash),
  KEY id_syndic (id_syndic)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_messages`
#

CREATE TABLE spip_messages (
  id_message bigint(21) NOT NULL auto_increment,
  titre text NOT NULL,
  texte longblob NOT NULL,
  type varchar(6) NOT NULL default '',
  date_heure datetime NOT NULL default '0000-00-00 00:00:00',
  date_fin datetime NOT NULL default '0000-00-00 00:00:00',
  rv char(3) NOT NULL default '',
  statut varchar(6) NOT NULL default '',
  id_auteur bigint(21) NOT NULL default '0',
  maj timestamp(14) NOT NULL,
  PRIMARY KEY  (id_message),
  KEY id_auteur (id_auteur)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_meta`
#

CREATE TABLE spip_meta (
  nom varchar(255) NOT NULL default '',
  valeur varchar(255) default '',
  maj timestamp(14) NOT NULL,
  PRIMARY KEY  (nom)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_mots`
#

CREATE TABLE spip_mots (
  id_mot bigint(21) NOT NULL auto_increment,
  type varchar(100) NOT NULL default '',
  titre text NOT NULL,
  descriptif text NOT NULL,
  texte longblob NOT NULL,
  id_groupe bigint(21) NOT NULL default '0',
  extra longblob,
  idx enum('','1','non','oui','idx') NOT NULL default '',
  maj timestamp(14) NOT NULL,
  PRIMARY KEY  (id_mot),
  KEY type (type),
  KEY idx (idx)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_mots_articles`
#

CREATE TABLE spip_mots_articles (
  id_mot bigint(21) NOT NULL default '0',
  id_article bigint(21) NOT NULL default '0',
  KEY id_mot (id_mot),
  KEY id_article (id_article)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_mots_breves`
#

CREATE TABLE spip_mots_breves (
  id_mot bigint(21) NOT NULL default '0',
  id_breve bigint(21) NOT NULL default '0',
  KEY id_mot (id_mot),
  KEY id_breve (id_breve)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_mots_forum`
#

CREATE TABLE spip_mots_forum (
  id_mot bigint(21) NOT NULL default '0',
  id_forum bigint(21) NOT NULL default '0',
  KEY id_mot (id_mot),
  KEY id_forum (id_forum)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_mots_rubriques`
#

CREATE TABLE spip_mots_rubriques (
  id_mot bigint(21) NOT NULL default '0',
  id_rubrique bigint(21) NOT NULL default '0',
  KEY id_mot (id_mot),
  KEY id_rubrique (id_rubrique)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_mots_syndic`
#

CREATE TABLE spip_mots_syndic (
  id_mot bigint(21) NOT NULL default '0',
  id_syndic bigint(21) NOT NULL default '0',
  KEY id_mot (id_mot),
  KEY id_syndic (id_syndic)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_petitions`
#

CREATE TABLE spip_petitions (
  id_article bigint(21) NOT NULL default '0',
  email_unique char(3) NOT NULL default '',
  site_obli char(3) NOT NULL default '',
  site_unique char(3) NOT NULL default '',
  message char(3) NOT NULL default '',
  texte longblob NOT NULL,
  maj timestamp(14) NOT NULL,
  PRIMARY KEY  (id_article)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_referers`
#

CREATE TABLE spip_referers (
  referer_md5 bigint(20) unsigned NOT NULL default '0',
  date date NOT NULL default '0000-00-00',
  referer varchar(255) NOT NULL default '',
  visites int(10) unsigned NOT NULL default '0',
  visites_jour int(10) unsigned NOT NULL default '0',
  maj timestamp(14) NOT NULL,
  PRIMARY KEY  (referer_md5)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_referers_articles`
#

CREATE TABLE spip_referers_articles (
  id_article int(10) unsigned NOT NULL default '0',
  referer_md5 bigint(20) unsigned NOT NULL default '0',
  date date NOT NULL default '0000-00-00',
  referer varchar(255) NOT NULL default '',
  visites int(10) unsigned NOT NULL default '0',
  maj timestamp(14) NOT NULL,
  PRIMARY KEY  (id_article,referer_md5),
  KEY referer_md5 (referer_md5)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_referers_temp`
#

CREATE TABLE spip_referers_temp (
  ip int(10) unsigned NOT NULL default '0',
  referer varchar(255) NOT NULL default '',
  referer_md5 bigint(20) unsigned NOT NULL default '0',
  type enum('article','rubrique','breve','autre') NOT NULL default 'article',
  id_objet int(10) unsigned NOT NULL default '0',
  maj timestamp(14) NOT NULL,
  PRIMARY KEY  (type,id_objet,referer_md5,ip)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_rubriques`
#

CREATE TABLE spip_rubriques (
  id_rubrique bigint(21) NOT NULL auto_increment,
  id_parent bigint(21) NOT NULL default '0',
  titre text NOT NULL,
  descriptif text NOT NULL,
  texte longblob NOT NULL,
  id_secteur bigint(21) NOT NULL default '0',
  maj timestamp(14) NOT NULL,
  export varchar(10) default 'oui',
  id_import bigint(20) default '0',
  statut varchar(10) NOT NULL default '',
  date datetime NOT NULL default '0000-00-00 00:00:00',
  lang varchar(10) NOT NULL default '',
  langue_choisie char(3) default 'non',
  extra longblob,
  idx enum('','1','non','oui','idx') NOT NULL default '',
  PRIMARY KEY  (id_rubrique),
  KEY lang (lang),
  KEY id_parent (id_parent),
  KEY idx (idx)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_signatures`
#

CREATE TABLE spip_signatures (
  id_signature bigint(21) NOT NULL auto_increment,
  id_article bigint(21) NOT NULL default '0',
  date_time datetime NOT NULL default '0000-00-00 00:00:00',
  nom_email text NOT NULL,
  ad_email text NOT NULL,
  nom_site text NOT NULL,
  url_site text NOT NULL,
  message mediumtext NOT NULL,
  statut varchar(10) NOT NULL default '',
  idx enum('','1','non','oui','idx') NOT NULL default '',
  maj timestamp(14) NOT NULL,
  PRIMARY KEY  (id_signature),
  KEY id_article (id_article),
  KEY statut (statut),
  KEY idx (idx)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_syndic`
#

CREATE TABLE spip_syndic (
  id_syndic bigint(21) NOT NULL auto_increment,
  id_rubrique bigint(21) NOT NULL default '0',
  id_secteur bigint(21) NOT NULL default '0',
  nom_site blob NOT NULL,
  url_site blob NOT NULL,
  url_syndic blob NOT NULL,
  descriptif blob NOT NULL,
  idx enum('','1','non','oui','idx') NOT NULL default '',
  maj timestamp(14) NOT NULL,
  syndication char(3) NOT NULL default '',
  statut varchar(10) NOT NULL default '',
  date datetime NOT NULL default '0000-00-00 00:00:00',
  date_syndic datetime NOT NULL default '0000-00-00 00:00:00',
  date_index datetime NOT NULL default '0000-00-00 00:00:00',
  moderation char(3) NOT NULL default '',
  PRIMARY KEY  (id_syndic),
  KEY id_rubrique (id_rubrique),
  KEY id_secteur (id_secteur),
  KEY statut (statut,date_syndic),
  KEY idx (idx)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_syndic_articles`
#

CREATE TABLE spip_syndic_articles (
  id_syndic_article bigint(21) NOT NULL auto_increment,
  id_syndic bigint(21) NOT NULL default '0',
  titre text NOT NULL,
  url varchar(255) NOT NULL default '',
  date datetime NOT NULL default '0000-00-00 00:00:00',
  lesauteurs text NOT NULL,
  maj timestamp(14) NOT NULL,
  statut varchar(10) NOT NULL default '',
  descriptif blob NOT NULL,
  PRIMARY KEY  (id_syndic_article),
  KEY id_syndic (id_syndic),
  KEY statut (statut),
  KEY url (url)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_types_documents`
#

CREATE TABLE spip_types_documents (
  id_type bigint(21) NOT NULL auto_increment,
  titre text NOT NULL,
  descriptif text NOT NULL,
  extension varchar(10) NOT NULL default '',
  mime_type varchar(100) NOT NULL default '',
  inclus enum('non','image','embed') NOT NULL default 'non',
  upload enum('oui','non') NOT NULL default 'oui',
  maj timestamp(14) NOT NULL,
  PRIMARY KEY  (id_type),
  UNIQUE KEY extension (extension),
  KEY inclus (inclus)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_versions`
#

CREATE TABLE spip_versions (
  id_article bigint(21) NOT NULL default '0',
  id_version int(10) unsigned NOT NULL default '0',
  date datetime NOT NULL default '0000-00-00 00:00:00',
  id_auteur bigint(21) NOT NULL default '0',
  titre_version text NOT NULL,
  permanent char(3) NOT NULL default '',
  chapo text NOT NULL,
  texte text NOT NULL,
  ps text NOT NULL,
  extra text NOT NULL,
  PRIMARY KEY  (id_article,id_version),
  KEY date (id_article,date),
  KEY id_auteur (id_auteur)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_versions_fragments`
#

CREATE TABLE spip_versions_fragments (
  id_fragment int(10) unsigned NOT NULL default '0',
  version_min int(10) unsigned NOT NULL default '0',
  version_max int(10) unsigned NOT NULL default '0',
  id_article bigint(21) NOT NULL default '0',
  compress tinyint(4) NOT NULL default '0',
  fragment longblob NOT NULL,
  PRIMARY KEY  (id_article,id_fragment,version_min)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_visites`
#

CREATE TABLE spip_visites (
  date date NOT NULL default '0000-00-00',
  visites int(10) unsigned NOT NULL default '0',
  maj timestamp(14) NOT NULL,
  PRIMARY KEY  (date)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_visites_articles`
#

CREATE TABLE spip_visites_articles (
  date date NOT NULL default '0000-00-00',
  id_article int(10) unsigned NOT NULL default '0',
  visites int(10) unsigned NOT NULL default '0',
  maj timestamp(14) NOT NULL,
  PRIMARY KEY  (date,id_article)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Structure de la table `spip_visites_temp`
#

CREATE TABLE spip_visites_temp (
  ip int(10) unsigned NOT NULL default '0',
  type enum('article','rubrique','breve','autre') NOT NULL default 'article',
  id_objet int(10) unsigned NOT NULL default '0',
  maj timestamp(14) NOT NULL,
  PRIMARY KEY  (type,id_objet,ip)
) TYPE=MyISAM;
Hors ligneAnthony Le 13/07/2005 à 12:46 Profil de Anthony Configuration de Anthony

Admin
Ce que tu peux faire, c'est, lors de la connexion, faire une requête qui vérifie comme ceci le login et pass :

<?php      //si le session_start(); ne figure pas en haut, rajoute-le      //n'oublie pas de rajouter la connexion à la base      $requete=mysql_query("SELECT login,id_auteur FROM spip_auteurs WHERE login='".$login_formulaire."' AND pass=md5('".$passe_formulaire."')");      mysql_close();      if(mysql_num_rows($requete)===0)      {           //mot de passe pas bon ou pseudo inexistant           exit;      }      $r=mysql_fetch_row($requete);      $_SESSION['id_auteur']=$r[1];      $_SESSION['login']=$r[0]; ?>
voilà. Je te conseille de rajouter un index sur le champ "login" dans ta table spip_auteurs. Ensuite tu auras accès à l'id de l'auteur connecté via la variable de session $_SESSION['id_auteur'] qui restera utilisable tant que le membre sera connecté.
--

Hors ligneByld Le 13/07/2005 à 13:12 Profil de Byld Configuration de Byld

Merci beaucoup^! Cela ne fonctionne pas en l'etat sur SPIP, mais ça me donne l'architecture d'un filtre que je vais pouvoir placer dans mes options .php3 et definir ainsi un critère ou une balise.
Super! Merci encore!
Hors ligneAnthony Le 13/07/2005 à 13:21 Profil de Anthony Configuration de Anthony

Admin
De rien, je classe comme résolu. Si tu as d'autres questions n'hésite pas :-)
--

Vous avez résolu votre problème avec VIC ? Faites-le savoir sur les réseaux sociaux !
Vulgarisation-informatique.com
Cours en informatique & tutoriels