lannoo Posted February 2, 2008 Share Posted February 2, 2008 i have a crimegame: www.armed.be and i want to add a new section: business. so the sql is: DROP TABLE IF EXISTS `bedrijven`; CREATE TABLE `bedrijven` ( `bedrijf` varchar(255) NOT NULL default '', `eigenaar` varchar(255) NOT NULL default '', `winst` varchar(255) NOT NULL default '', `prijs` varchar(255) NOT NULL default '' ) TYPE=MyISAM; # # Gegevens worden uitgevoerd voor tabel `bedrijven` # INSERT INTO `bedrijven` (`bedrijf`, `eigenaar`, `winst`, `prijs`) VALUES ('taxi','spel','0','0'), ('haven','spel','0','0'), ('vliegveld','spel','0','0'), ('nachtclub','spel','0','0'), ('kpn','spel','0','0'), ('ns','spel','0','0'), ('advocaten','spel','0','0'), ('connexxion','spel','0','0'), ('dhl','spel','0','0'), ('sixflags','spel','0','0'), ('ziekenhuis','spel','0','0'), ('essent','spel','0','0'), ('microsoft','spel','0','0'), ('wapenshop','spel','0','0'); and in my file is: $winst = mysql_query("SELECT * FROM `bedrijven` WHERE `winst`='$winst'"); $ei = mysql_query("SELECT * FROM `bedrijven` WHERE `bedrijf`='$bedrijf'"); $eig = mysql_fetch_assoc($ei); mysql_query("UPDATE `[users]` SET `bank`=`bank`+'$winst' WHERE `login`='$eig->eigenaar'"); but it does nothing. how? Link to comment https://forums.phpfreaks.com/topic/89076-help-me-fix-it/ Share on other sites More sharing options...
monkeytooth Posted February 2, 2008 Share Posted February 2, 2008 define nothing, compared to what you want it to do Link to comment https://forums.phpfreaks.com/topic/89076-help-me-fix-it/#findComment-456285 Share on other sites More sharing options...
lannoo Posted February 2, 2008 Author Share Posted February 2, 2008 it needs to deposit the "winst" (= profit) on your bank account (bank) Link to comment https://forums.phpfreaks.com/topic/89076-help-me-fix-it/#findComment-456336 Share on other sites More sharing options...
lannoo Posted February 2, 2008 Author Share Posted February 2, 2008 and eigenaar = owner Link to comment https://forums.phpfreaks.com/topic/89076-help-me-fix-it/#findComment-456337 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.