darknewbie31 | Alors la tu a réussi a me perdre xD
Bon en faite j'ai ma base de données qui contient 2 table nécessaire a ce script. Le but est d'afficher les détails d'une de mes tables ( mob_db ) et de changer les "MVPid" ou "DropID" par l'enregistrement respectif dans item_db.
voila la stucture d'une table de ma BDD :
Code :
- CREATE TABLE `mob_db` (
- `ID` mediumint(9) unsigned NOT NULL default '0',
- `Sprite` text NOT NULL,
- `kName` text NOT NULL,
- `iName` text NOT NULL,
- `LV` tinyint(6) unsigned NOT NULL default '0',
- `HP` int(9) unsigned NOT NULL default '0',
- `SP` mediumint(9) unsigned NOT NULL default '0',
- `EXP` mediumint(9) unsigned NOT NULL default '0',
- `JEXP` mediumint(9) unsigned NOT NULL default '0',
- `Range1` tinyint(4) unsigned NOT NULL default '0',
- `ATK1` smallint(6) unsigned NOT NULL default '0',
- `ATK2` smallint(6) unsigned NOT NULL default '0',
- `DEF` smallint(6) unsigned NOT NULL default '0',
- `MDEF` smallint(6) unsigned NOT NULL default '0',
- `STR` tinyint(4) unsigned NOT NULL default '0',
- `AGI` tinyint(4) unsigned NOT NULL default '0',
- `VIT` tinyint(4) unsigned NOT NULL default '0',
- `INT` tinyint(4) unsigned NOT NULL default '0',
- `DEX` tinyint(4) unsigned NOT NULL default '0',
- `LUK` tinyint(4) unsigned NOT NULL default '0',
- `Range2` tinyint(4) unsigned NOT NULL default '0',
- `Range3` tinyint(4) unsigned NOT NULL default '0',
- `Scale` tinyint(4) unsigned NOT NULL default '0',
- `Race` tinyint(4) unsigned NOT NULL default '0',
- `Element` tinyint(4) unsigned NOT NULL default '0',
- `Mode` smallint(6) unsigned NOT NULL default '0',
- `Speed` smallint(6) unsigned NOT NULL default '0',
- `aDelay` smallint(6) unsigned NOT NULL default '0',
- `aMotion` smallint(6) unsigned NOT NULL default '0',
- `dMotion` smallint(6) unsigned NOT NULL default '0',
- `MEXP` mediumint(9) unsigned NOT NULL default '0',
- `ExpPer` smallint(9) unsigned NOT NULL default '0',
- `MVP1id` smallint(9) unsigned NOT NULL default '0',
- `MVP1per` smallint(9) unsigned NOT NULL default '0',
- `MVP2id` smallint(9) unsigned NOT NULL default '0',
- `MVP2per` smallint(9) unsigned NOT NULL default '0',
- `MVP3id` smallint(9) unsigned NOT NULL default '0',
- `MVP3per` smallint(9) unsigned NOT NULL default '0',
- `Drop1id` smallint(9) unsigned NOT NULL default '0',
- `Drop1per` smallint(9) unsigned NOT NULL default '0',
- `Drop2id` smallint(9) unsigned NOT NULL default '0',
- `Drop2per` smallint(9) unsigned NOT NULL default '0',
- `Drop3id` smallint(9) unsigned NOT NULL default '0',
- `Drop3per` smallint(9) unsigned NOT NULL default '0',
- `Drop4id` smallint(9) unsigned NOT NULL default '0',
- `Drop4per` smallint(9) unsigned NOT NULL default '0',
- `Drop5id` smallint(9) unsigned NOT NULL default '0',
- `Drop5per` smallint(9) unsigned NOT NULL default '0',
- `Drop6id` smallint(9) unsigned NOT NULL default '0',
- `Drop6per` smallint(9) unsigned NOT NULL default '0',
- `Drop7id` smallint(9) unsigned NOT NULL default '0',
- `Drop7per` smallint(9) unsigned NOT NULL default '0',
- `Drop8id` smallint(9) unsigned NOT NULL default '0',
- `Drop8per` smallint(9) unsigned NOT NULL default '0',
- `Drop9id` smallint(9) unsigned NOT NULL default '0',
- `Drop9per` smallint(9) unsigned NOT NULL default '0',
- `DropCardid` smallint(9) unsigned NOT NULL default '0',
- `DropCardper` smallint(9) unsigned NOT NULL default '0',
- PRIMARY KEY (`ID`)
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
Et voila pour les Items :
Code :
- CREATE TABLE `item_db` (
- `id` smallint(5) unsigned NOT NULL default '0',
- `name_english` varchar(50) NOT NULL default '',
- `name_japanese` varchar(50) NOT NULL default '',
- `type` tinyint(2) unsigned NOT NULL default '0',
- `price_buy` mediumint(10) unsigned default NULL,
- `price_sell` mediumint(10) unsigned default NULL,
- `weight` smallint(5) unsigned NOT NULL default '0',
- `attack` smallint(3) unsigned default NULL,
- `defence` tinyint(3) unsigned default NULL,
- `range` tinyint(2) unsigned default NULL,
- `slots` tinyint(2) unsigned default NULL,
- `equip_jobs` int(12) unsigned default NULL,
- `equip_upper` tinyint(8) unsigned default NULL,
- `equip_genders` tinyint(2) unsigned default NULL,
- `equip_locations` smallint(4) unsigned default NULL,
- `weapon_level` tinyint(2) unsigned default NULL,
- `equip_level` tinyint(3) unsigned default NULL,
- `refineable` tinyint(1) unsigned default NULL,
- `view` smallint(3) unsigned default NULL,
- `script` text,
- `equip_script` text,
- `unequip_script` text,
- PRIMARY KEY (`id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
Après pour ce qui est du code php, c'est un simple tableau qui affiche mes enregistrement et j'utilise la solution énoncé plus haut avec le IN ( pour le moment ).
Le problème est que par la suite j'aurais des données d'un fichier texte a insérer (une description des mes Dropid)
De plus la requête va dépasser 30 sec, personne attendra 20 plombe pour afficher la page et voir la page planter car la requête est trop longue |