Jump to content

waynew

Members
  • Posts

    2,405
  • Joined

  • Last visited

Everything posted by waynew

  1. I sort of have my own framework. I have a structure and stick to if for each project. I have a db class that I use in every single MySQL-related project. It dramatically speeds up my writing of select, insert and update queries. I have a message class which handles all error and success messages that are created for the user to see. That has also dramatically increased my productivity. The rest of my classes are all built to work with those two classes.
  2. I find that ringing up Google and threatening their staff members always works.
  3. Google webmasters tells you such information.
  4. It should be clear to you now that PHPFreaks existed before the Internet was invented.
  5. Get them to send you their publisher id and insert it accordingly.
  6. Started this way back in July. Things have been slow but I finally got around to "finishing it". The products page needs to be done and a few things (the logo) need to be re-done, but the majority of the website is finished. Any thoughts & critiques etc before I start to polish it off? Vet Clinic Wexford
  7. <?php $age = 0; //by default if(isset($_POST['age'])){ $age = (int) $_POST['age']; } $query = "SELECT * FROM yourtablename WHERE age = '$age'"; $result = mysql_query($query) or trigger_error(mysql_error()); while($row = mysql_fetch_assoc($result)){ echo $row['name'].' - Age '.$row['age'].'<br />'; } ?> You'll need to make a HTML form that has a textfield called 'age' that allows users to enter in the age that they're looking for.
  8. Yes, but the loop doesn't break until the NEXT id has been found, meaning that 1 will be overwritten by 3. Or am I wrong here?
  9. I'm guessing that my logic is somewhat screwed in the second loop of the second piece of code?
  10. I have a system that allows the administrator to add clothing items. Each clothing item is added to a category. Simple stuff. When a visitor to the site clicks on a specific category, they are automatically shown the first item in that category. Note that I'm adding in the <?php tags to make it easier to read. Also note that I don't think this piece of code is the problem. <?php function get_first_item(){ $cond = ""; if(isset($_GET['category_id'])){ $cat = (int) $_GET['category_id']; if($cat != 0){ $cond = " WHERE category_id = '$cat' "; } } $get = $this->db->get_row("SELECT * FROM item $cond ORDER BY item_id LIMIT 1"); return $get; } ?> The above code selects the first item from the chosen category. On each page, a PREVIOUS and NEXT link is shown. These links allow the user to navigate further through the chosen category. I get the previous and next link by getting the id of the current item and giving it to function below: function get_prev_and_last_items($id){ $arr['prev'] = 0; $arr['next'] = 0; $id = (int) $id; if($id == 0) return $arr; $cond = ""; if(isset($_GET['category_id'])){ $cat = (int) $_GET['category_id']; if($cat != 0){ $cond = " WHERE category_id = '$cat' "; } } $select = $this->db->query("SELECT * FROM item $cond ORDER BY item_id"); $items_in_cat = array(); while($row = mysql_fetch_assoc($select)){ array_push($items_in_cat,$row['item_id']); } foreach($items_in_cat as $i){ if($i < $id){ $arr['prev'] = $i; } if($i > $id){ $arr['next'] = $i; break; } } return $arr; } Now I know that the second loop is redundant and that I could have just carried out the same actions in the first loop. The problem is that certain items aren't showing after been added to a category. I added 17 items to one category, yet I was only able to navigate, from start to finish, through 7.
  11. Lukeywes1234 is now the king of PHPFreaks.
  12. Ho, ho, ho - they sure are crazy. http://www.techcrunch.com/2010/01/04/4chan-youtube-porn/
  13. Today, I was (for once in my life) running around gun-ho, spraying bullets everywhere and throwing flash grenades. I shoot some guy and he shouts "You're a camper waynewex". I was like "What? Man, I just ran up the hill and shot you." Later on, I seen somebody hiding in the corner of the cave in Afghan. I took out my shotguns and blew his head off, only to realise it was the same little fucker who had been calling me a camper. Goddamn it this game makes me rage sometimes. And don't get me started on the spawn points on free-for-all.
  14. What's the name of the array? echo $nameofarray[0]['salt'];
  15. Happy Christmas guys. Cant believe nobody started this thread already. Bunch of bah humbugs. Any plans for the holiday season? Looking forward to Christmas? Yes/No? Looking forward to Christmas dinner? Have a problem with turkey? Like chicken/ham/goose/dog instead?
  16. xXxDaNi3LBoYPwNsYeWxXx
  17. I prefer the ass.
  18. My PlayStation PSN is the same as my username: waynewex Just finished up a few matches there. 17 - 2 Quarry 22 - 3 Kirachi 14 - 0 Wasteland HC Team deathmatch. I can't play the regular modes because of the ridiculous amount of bullets you have to put into someone in order to kill them. My KDR is now 1.66/1.67 I'm also not doing prestige. I just can't justify it.
  19. I have a problem with my laptop too. Whenever I put it in water it seems to stop working.
  20. Perks: Bling Pro Cold Blooded Pro Ninja Pro Weapon: 50. Cal Sniper rifle with Silencer and Thermal 1887 Akimbo and FMJ I play in Hardcore modes so I basically get to play God with that load-out.
  21. My first killstreak is at 7 kills, so yeah, I'm a bit of an arrogant wanker. Helicopter -> Pavelow -> Chopper Gunner or AC I hate that though. So many times I've gotten six kills in quick succession. Then I wait for ages trying to get my next kill and nobody comes across me. Then I get impatient and get shot. It's even more annoying when you get your killstreak and the game is just about to end or somebody else's killstreak is blocking you from calling yours in.
  22. Yea, but I have to admit - I am an asshole in that regard. In COD MW2, people use "Tactical Insertions". They allow them to respawn back into the spot that they placed the flare. Now, whenever I see an enemy tactical insertion, I either place a claymore there or wait with a shotgun.
  23. REAL soldiers run around Afghanistan brandishing two 1887 shotguns. Cover? Fuck cover. Only pussies and homosexuals use cover. Me?! I just run around throwing grenades and spraying bullets at anything that moves. Who cares about accuracy?
  24. Of course it's a legit strategy. Using cover is usually a pretty advantageous thing to do. Running around like you're Rambo after snorting several lines of coke isn't always the best line of action.
  25. I got 33 kills and 0 deaths in Wasteland about a week ago. Man that felt good. If only I had the nuke perk enabled.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.