PHP interesse |
|
Ik heb nu dit voor in de db:
--
-- Table structure for table `bl`
--
CREATE TABLE `bl` (
`id` INT NOT NULL AUTO_INCREMENT ,
`gameid` varchar(5) NOT NULL default '',
`login` VARCHAR( 20 ) NOT NULL ,
`time` DATETIME NOT NULL ,
`ip` VARCHAR( 255 ) NOT NULL ,
PRIMARY KEY ( `id` )
);
--
-- Dumping data for table `bl`
--
-- -- Table structure for table `bl` -- CREATE TABLE `bl` ( `id` INT NOT NULL AUTO_INCREMENT , `gameid` varchar(5) NOT NULL default '', `login` VARCHAR( 20 ) NOT NULL , ` time` DATETIME NOT NULL ,`ip` VARCHAR( 255 ) NOT NULL , ); -- -- Dumping data for table `bl` --
En dit voor het donatie systeem
}
mysql_query("UPDATE `leden` SET `callpoints`=`callpoints`+'1' WHERE `id`='{$_SESSION['gameid']}'");
mysql_query("UPDATE `[users]` SET `belcredits`=`belcredits`+'100' WHERE `login`='$data->login'");
mysql_query("INSERT INTO `bl` (`gameid`,`login`,`time`,`ip`) WHERE `id`='{$_SESSION['gameid']}'");
echo
} mysql_query("UPDATE `leden` SET `callpoints`=`callpoints`+'1' WHERE `id`='{$_SESSION['gameid']}'"); mysql_query("UPDATE `[users]` SET `belcredits`=`belcredits`+'100' WHERE `login`='$data->login'"); mysql_query("INSERT INTO `bl` (`gameid`,`login`,`time`,`ip`) WHERE `id`='{$_SESSION['gameid']}'");
Is dit voldoende / correct?
EDIT: Het donatie systeem werkt wel alleen wordt er in de tabel BL niets bijgeschreven. Hoe is dit op te lossen? |