par guetguet » 02 janv. 2008, 00:34
par Sékiltoyai » 01 janv. 2008, 23:08
par guetguet » 01 janv. 2008, 20:23
Code : Tout sélectionner
CREATE TABLE IF NOT EXISTS `joueurs` ( `id` int(11) NOT NULL auto_increment, `pseudo` varchar(255) NOT NULL, `mdp` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `version` varchar(255) NOT NULL, `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, `galaxie` int(11) NOT NULL, `systeme` int(11) NOT NULL, `position` int(11) NOT NULL, `points_total` int(11) NOT NULL, `points_flotte` int(11) NOT NULL, `points_recherche` int(11) NOT NULL, `points_total_encour` float NOT NULL, `points_flotte_encour` float NOT NULL, `points_recherche_encour` float NOT NULL, `pertes_infliges` int(11) NOT NULL, `pertes_reçu` int(11) NOT NULL, `alliance` varchar(255) NOT NULL, `processique` int(11) NOT NULL, `processique_temps` int(11) NOT NULL, `conduction` int(11) NOT NULL, `conduction_temps` int(11) NOT NULL, `espionnage` int(11) NOT NULL, `espionnage_temps` int(11) NOT NULL, `armes` int(11) NOT NULL, `armes_temps` int(11) NOT NULL, `bouclier` int(11) NOT NULL, `bouclier_temps` int(11) NOT NULL, `blindage` int(11) NOT NULL, `blindage_temps` int(11) NOT NULL, `tritorsion` int(11) NOT NULL, `tritorsion_temps` int(11) NOT NULL, `drivepulsion` int(11) NOT NULL, `drivepulsion_temps` int(11) NOT NULL, `hypertritorsion` int(11) NOT NULL, `hypertritorsion_temps` int(11) NOT NULL, `ions` int(11) NOT NULL, `ions_temps` int(11) NOT NULL, `laser` int(11) NOT NULL, `laser_temps` int(11) NOT NULL, `platinium` int(11) NOT NULL, `platinium_temps` int(11) NOT NULL, `connection_interplanetaire` int(11) NOT NULL, `connectioni_temps` int(11) NOT NULL, `graviton` int(11) NOT NULL, `graviton_temps` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=63 ;
CREATE TABLE IF NOT EXISTS `planetes` ( `id` int(11) NOT NULL auto_increment, `id_joueur` int(11) NOT NULL, `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `galaxie` int(11) NOT NULL, `systeme` int(11) NOT NULL, `position` int(11) NOT NULL, `tmin` int(11) NOT NULL, `tmax` int(11) NOT NULL, `diametre` int(11) NOT NULL, `case_util` int(11) NOT NULL, `caset` int(11) NOT NULL, `nom` varchar(255) NOT NULL, `zinc` int(11) NOT NULL, `mercure` int(11) NOT NULL, `oxonium` int(11) NOT NULL, `uranium` int(11) NOT NULL, `mine_zinc` int(11) NOT NULL, `zinc_temps` int(11) unsigned NOT NULL, `mine_mercure` int(11) NOT NULL, `mercure_temps` int(10) unsigned NOT NULL, `mine_oxonium` int(11) NOT NULL, `oxonium_temps` int(11) unsigned NOT NULL, `mine_uranium` int(11) NOT NULL, `uranium_temps` int(10) unsigned NOT NULL, `pourcentage_zinc` int(11) NOT NULL, `pourcentage_mercure` int(11) NOT NULL, `pourcentage_oxonium` int(11) NOT NULL, `pourcentage_uranium` int(11) NOT NULL, `centrale_condensation` int(11) NOT NULL, `central1_temps` int(11) NOT NULL, `centrale_oxonium` int(11) NOT NULL, `central2_temps` int(11) NOT NULL, `station_solaire` int(11) NOT NULL, `temps_stations` int(11) NOT NULL, `depot_zinc` int(11) NOT NULL, `depotz_temps` int(11) NOT NULL, `depot_mercure` int(11) NOT NULL, `depotm_temps` int(11) NOT NULL, `depot_oxonium` int(11) NOT NULL, `depoto_temps` int(11) NOT NULL, `depot_uranium` int(11) NOT NULL, `depotu_temps` int(11) NOT NULL, `centre_scientifique` int(11) NOT NULL, `centres_temps` int(11) NOT NULL, `centre_de_combat` int(11) NOT NULL, `centrec_temps` int(11) NOT NULL, `centre_robotique` int(11) NOT NULL, `centrerobo_temps` int(11) NOT NULL, `usine_robotique` int(11) NOT NULL, `usinerobo_temps` int(11) NOT NULL, `terramodeleur` int(11) NOT NULL, `terramodeleur_temps` int(11) NOT NULL, `reservoir_a_missile` int(11) NOT NULL, `reservoirm_temps` int(11) NOT NULL, `transporteur_gt` int(11) NOT NULL, `transporteur_gt_10` int(11) NOT NULL, `chasseur` int(11) NOT NULL, `chasseur_vipe` int(11) NOT NULL, `cuirasse` int(11) NOT NULL, `destroyer` int(11) NOT NULL, `bomber` int(11) NOT NULL, `forteresse_destructrice` int(11) NOT NULL, `wraper` int(11) NOT NULL, `sonde` int(11) NOT NULL, `convertisseur` int(11) NOT NULL, `colonisateur` int(11) NOT NULL, `lanceur_afx` int(11) NOT NULL, `lanceur_afx_10` int(11) NOT NULL, `laser_canon` int(11) NOT NULL, `tirailleur` int(11) NOT NULL, `cataliseur` int(11) NOT NULL, `lanceur_de_platinium` int(11) NOT NULL, `boucliant` int(11) NOT NULL, `boucliant_10` int(11) NOT NULL, `intersepteur` int(11) NOT NULL, `missile_afx` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=17 ;
par Sékiltoyai » 01 janv. 2008, 17:43
oki je vais coder tout à l'heure un module ou seul moi (connecté) je verrai le temps de chargement de chaque page et le nombre de requêtes exécutés.
-ESt ce que cette requête est bien conçue ? Code : Tout sélectionner$retour = mysql_query('SELECT UNIX_TIMESTAMP(p.timestamp), p.zinc, p.mercure, p.oxonium, p.uranium, p.mine_zinc, p.mine_mercure, p.mine_oxonium, p.mine_uranium, p.centrale_oxonium, p.depot_zinc, p.depot_mercure, p.depot_oxonium, p.depot_uranium, p.pourcentage_zinc, p.pourcentage_mercure, p.pourcentage_oxonium, p.pourcentage_uranium, p.centrale_condensation, p.station_solaire, p.tmin, p.tmax FROM planetes p join joueurs j on p.id_joueur=j.id WHERE j.pseudo=\''.$pseudo.'\''); -Si elle est bien conçu j'ai essayé toute à l'heure de récupérer des infos de la table joueurs en rajoutants les champs j.pseudo, j.conduction dans la sélection des champs juste avant le FROM mais il ne me les sélectionne pas :S
$retour = mysql_query('SELECT UNIX_TIMESTAMP(p.timestamp), p.zinc, p.mercure, p.oxonium, p.uranium, p.mine_zinc, p.mine_mercure, p.mine_oxonium, p.mine_uranium, p.centrale_oxonium, p.depot_zinc, p.depot_mercure, p.depot_oxonium, p.depot_uranium, p.pourcentage_zinc, p.pourcentage_mercure, p.pourcentage_oxonium, p.pourcentage_uranium, p.centrale_condensation, p.station_solaire, p.tmin, p.tmax FROM planetes p join joueurs j on p.id_joueur=j.id WHERE j.pseudo=\''.$pseudo.'\'');
par guetguet » 01 janv. 2008, 17:11
par Sékiltoyai » 01 janv. 2008, 16:37
par guetguet » 01 janv. 2008, 15:25
par Sékiltoyai » 01 janv. 2008, 14:32
Mais pour la table galaxie je fait comment alors ?
Sinon pour les pourcentages de production tu parlais ?
par guetguet » 01 janv. 2008, 14:20
par Sékiltoyai » 01 janv. 2008, 13:11
par Kaoteknik » 01 janv. 2008, 11:53
$req = "SELECT joueurs.pseudo, systemes.nom, planetes.nom ". "FROM joueurs, systeme, planetes ". "WHERE systemes.id_joueur = joueurs.id AND planetes.id_systeme = systeme.id";
par guetguet » 01 janv. 2008, 10:21
par Kaoteknik » 01 janv. 2008, 03:28
par Sékiltoyai » 01 janv. 2008, 01:10
par guetguet » 31 déc. 2007, 21:12