Jump to content
MakeWebGames

Decepti0n

Members
  • Posts

    731
  • Joined

  • Last visited

    Never

Decepti0n's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. 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']
  2. Re: Can someone point me what i am doing wrong here? http://php.net/session_regenerate_id
  3. Re: Looking For A Custom Game script Yeah, if you want something like that oneworld site, your budget should realistically be at least $25k
  4. Re: New Hosting Needing (mt) Non affiliate link Get grid service, should be more than enough
  5. Re: House Picture No need for an array Use the house id, file_exists and a spare directory. Bam done
  6. 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
  7. 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?
  8. 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
  9. 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
  10. 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 }
  11. Re: [mccode v2] Av Bank     heh
  12. 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() ... '
  13. 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
  14. 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
  15. 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
×
×
  • Create New...