
Decepti0n
Members-
Posts
731 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by Decepti0n
-
Re: Apache is hard! Yeah, don't bother with a whole lot of rules, either use the method above or if you still don't want the yourphp.php part, just send every url to a main page, and explode() the $_SERVER['REQUEST_URI']
-
Re: Can someone point me what i am doing wrong here? http://php.net/session_regenerate_id
-
Re: Looking For A Custom Game script Yeah, if you want something like that oneworld site, your budget should realistically be at least $25k
-
Re: New Hosting Needing (mt) Non affiliate link Get grid service, should be more than enough
-
Re: House Picture No need for an array Use the house id, file_exists and a spare directory. Bam done
-
Re: [mccode v2] Events Page Updated. @killah Fine, I'll try and explain. IN() accepts a comma separated list of values, so all of these are equal: WHERE x IN (1,2,3) WHERE x = 1 OR x = 2 OR x = 3 WHERE x > 0 AND x < 4 What you're doing, is only putting on value in it. This: WHERE x IN (1,2,3) is equal, and clearly much better, than this: q1: WHERE x IN(1) q2: WHERE x IN(2) q3: WHERE x IN(3) And using IN() with only one value is pointless since you can just use equals. You're saying "where it is in this group of numbers, and this group only contains one number" Now what you're doing with the checkboxes is fine, but you're looping over each one, so if they delete ten events, you'll run ten queries, when they can all be condensed into one. If you want a quicker way, here: From this: for($i = 0; $i < count($_POST['checkbox']); $i++) { mysql_query("DELETE FROM `events` WHERE `evID` IN(".$_POST['checkbox'][$i].") AND `evUSER` = ".$ir['userid']); $result = 1; } To this: $boxes = implode(',',$_POST['checkboxes']); mysql_query('DELETE FROM `events` WHERE `evID` IN ("'.$boxes.'") AND `evUSER` = "'.$ir['userid'].'"'); Shouuuuuuuld work
-
Re: [mccode v2] Events Page Updated. for($i = 0; $i < count($_POST['checkbox']); $i++) { mysql_query("DELETE FROM `events` WHERE `evID` IN(".$_POST['checkbox'][$i].") AND `evUSER` = ".$ir['userid']); $result = 1; } Do you know what you even did there or why what you did is a bad idea? Or how it can be improved? Or what the IN() func actually does and how the way you're doing it is completely weird?
-
Re: Help with DB Class. $my->dbQuery('SELECT * FROM `table` WHERE `x` = "%d" AND `y` = "%s"', $x, $y); // Then function dbQuery() { $args = func_get_args(); $query = vsprintf( array_shift($args), $args); // ... etc } Or, don't bother, and use adodb or something since it'll be much more beneficial in the long run
-
Re: Where do you do your shopping from? Amazon, would like to buy from Newegg but they don't ship here, some shirts from different sites but nothing major
-
Re: Another problem need help with $items = '61,62,63,64'; $itemsq = $db->query("SELECT COUNT(`inv_id`) as `c` FROM inventory WHERE `inv_itemid` IN (" . $items . ") AND `inv_userid` = '" . $userid . "'"); $fetch = mysql_fetch_assoc($itemsq); if ($fetch['c'] >= 1) { // Continue } else { // no } Although that i think would only work if they had one of the four items, if you needed all four, then try this: if ($fetch['c'] == 4) { // Continue } else { // no }
-
Re: [mccode v2] Av Bank heh
-
Little help, I'm recieving an error from a custom code
Decepti0n replied to CHAMAVELI's topic in General Discussion
Re: Little help, I'm recieving an error from a custom code Well yeah, I mean you can use var but you should be using public/private/protected. You wouldn't have 'public $var = $conn' though because it isn't defined, you'd just have 'public $conn = null;', then in the first function, set '$this->conn = mysql_connect() ... ' -
Little help, I'm recieving an error from a custom code
Decepti0n replied to CHAMAVELI's topic in General Discussion
Re: Little help, I'm recieving an error from a custom code Come on killah, you didn't even try there. You don't use 'global $anything' inside a class unless it's inside a function. 'var $conn' is correct and makes it a property (?) of the class -
Re: User Defined DPs Auto Crediting You should be passing a `quantity` value, and an `amount` field which is the cost per pack. eg <input type="hidden" name="quantity" value=" -- whatever they choose --" /> <input type="hidden" name="amount" value="5" /> Then when they pay they'll have to pay $5 times the quantity, and paypal will send you back the quantity amount
-
Re: My own Game Engine. Any sort of security should be handled by the programmers, it's a bit odd to have people specifically for it
-
Re: Need help with something $db->query("UPDATE users SET staffpass='$hash' WHERE userid=$userid");
-
Re: [mccode v2] Daily Donator Reward Change crystals=+10 to crystals = crystals + 10, and same with energy.
-
mccode-v2 streets.php includes image + ability to fight NPCS
Decepti0n replied to Uridium's topic in Free Modifications
Re: [uPGRADE] V2 streets.php includes image + ability to fight NPCS Why don't you use a loop for the grid? -
Re: MYSQL to give pics to User_level 0 how ??? update users set attpics = 'default.jpg' where user_level = 0
-
Re: The Standards of CE Mod! Why would you choose people you don't trust? (for anything for that matter)
-
Re: The Standards of CE Mod! MrGi, apart from the atrocious grammar and spelling, I don't find anything wrong with helping other people. I'd love to do it, and I try and do it when I can. The thing is, usually I'll see how the person is, if they're just posting an error and demanding a fix, I'll ignore it. If I can tell they're posting it and genuinely wanting to know why it's doing what it's doing, and they're open to suggestions, then I'll try and help them out. It's not hard to judge that either. Most of the things on here aren't very well done, but I can't go around to every single post and correct them, so I just try and look at the ones where people are asking for help. I'll try and explain it in depth and hope they go off and learn more about it to fix it. I'm not just going to go to every post and fix it all or I'd be recoding half the posts on here.
-
Re: What computer have you got? Custom built 500 GB HDD 2GB RAM AMD Athlon Dual Core 6000+ NVIDIA GeForce 8600 GT graphics 24" Dell something monitor
-
[mccode] Main menu users online count
Decepti0n replied to Modern-Empires's topic in Free Modifications
Re: main menu users online count It'll almost work Change $var = mysql_num_rows($sql); to $var = mysql_fetch_assoc($sql); And it will. Also there's no need to use sprintf on that, since you're putting the 900 in directly -
Re: Need Help Why would there be a tutorial for something custom? You just need to know the basics of php
-
[mccode v2] My Orginization & My Production
Decepti0n replied to ishmell's topic in Free Modifications
Re: My Orginization & My Production (V2) Not all, you need short open tags on (or some other setting)