Djkanna Posted March 30, 2010 Posted March 30, 2010 (edited) Removed, may be back. Edited November 10, 2012 by Djkanna Quote
Zero-Affect Posted March 30, 2010 Posted March 30, 2010 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. The above is just edited to my preference and untested. Quote
Djkanna Posted March 30, 2010 Author Posted March 30, 2010 Fair enough not everyone likes my style lol. Thanks :) Quote
KyleH112 Posted March 30, 2010 Posted March 30, 2010 wooo someone used my idea, thanks man +1 also take a look at: ad system for me? Quote
CJ - Twitch Posted March 30, 2010 Posted March 30, 2010 Lmao I just did mine. xD I will be using yours. Alot neater. :thumbsup: Quote
Djkanna Posted March 30, 2010 Author Posted March 30, 2010 Hehe.. Thanks are you going to post yours up I'd like to see? Quote
ddgamedesign Posted March 31, 2010 Posted March 31, 2010 I'm curious...is there a way to modify this so that's there only a random list of 4-5 players shown that are eligible for attack? That way, I can slap that code on various screens, sorta like a shoutbox kinda thing. Quote
melduk Posted March 31, 2010 Posted March 31, 2010 Hi, This is ace! This is just what Ive been looking for. Is there a way to make it so that it only shows people in the same city as you though? As obviouslly people not in the same city you can not attack. streetsyndicate - I'm not a coder but on line 8, change to: $users = $db->query ("SELECT u.`userid`, u.`username`, u.`level`, u.`hp`, u.`gang`, g.`gangname`, g.`gangPREF` FROM `users` u LEFT JOIN `gangs` g ON `gangID` = u.`gang` limit 5"); Â This will limit it to displaying 5 (as you can see on the end there is now limit 5, change this to limit 4 if you want it to display 4). Thanks. P.S. I test the above and it works. Quote
CJ - Twitch Posted March 31, 2010 Posted March 31, 2010 Hehe.. Thanks are you going to post yours up I'd like to see? I will post it later. Im on my EEE PC. :P Quote
ddgamedesign Posted March 31, 2010 Posted March 31, 2010 >Is there a way to make it so that it only shows people in the same city as you though? I want this too. A way to do it? Thanks to melduk above for the tip! :) Quote
Djkanna Posted March 31, 2010 Author Posted March 31, 2010 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Try that untested though. If it does work you can use $u['cityname'] for something if you like :) Quote
melduk Posted March 31, 2010 Posted March 31, 2010 Doesnt work :( QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.`cityname` FROM `users` u LEFT JOIN `gangs` g ON `gangID` = u.`gang` L' at line 1 Query was SELECT u.`userid`, u.`username`, u.`level`, u.`hp`, u.`gang`, u.`location`, g.`gangname`, g.`gangPREF` c.`cityname` FROM `users` u LEFT JOIN `gangs` g ON `gangID` = u.`gang` LEFT JOIN `cities` c ON c.`cityID` = 7 Quote
Djkanna Posted March 31, 2010 Author Posted March 31, 2010 Whoops edited the above post sorry about that. Quote
melduk Posted March 31, 2010 Posted March 31, 2010 No worries :) - still not working though. no error anymore. but seems to list everyone. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.