Jump to content

phpSensei

Members
  • Posts

    2,838
  • Joined

  • Last visited

    Never

Everything posted by phpSensei

  1. try this $sql="SELECT `id`, `image`,`time` FROM `tbl` WHERE `time` < '".$match_time."'"; echo $sql; $result = mysql_query($sql); if(!$result){ echo 'SELECT failed: '.mysql_error(); }else{ while($row = mysql_fetch_array($result)){ $id = $row['id']; if(!unlink($row['image'])){ echo "unlink ".$row['image']." failed"; }else{ } http://dev.mysql.com/doc/refman/5.5/en/reserved-words.html
  2. MySQL has a nice built-in tool called "LIKE"
  3. This query is searching by state and location, and according to your operator both location and match have to match exactly in order to return a result. I think you're looking for the LIKE sql method no?
  4. I see, I thought you were just looking for a more efficient way of doing this, the first code should work no problem. $lb = new LoadBackend($db, PATH_CG.PATH_BACKENDS); /* page is included within this class, either bring that page to the scope of index.php, or pass all the classes above into this class */ But yes your correct.
  5. LoadBackend is the base class, so all of your classes need to go through this classe's method anyways, You don't initiate LoadBackend, just initiate your classes normally and loadbackend will do the rest.
  6. You can use an ABSTRACT class which can force every single other class to use the LOADBACKEND's constructor, or however you go about handling the instances. Object Oriented needs to work like a machine, it has to be all connected to each other, so make use of design patterns and paradigm.,
  7. Np, i'll get to your other question, i have my handsss full with food.
  8. Well depends, if the construct method is being called by other classes then the scope would make a difference... With Abstract classes is another example too, but heres a basic one. example Fatal error: Cannot call private Class1::__construct() in /Applications/XAMPP/xamppfiles/htdocs/test.php on line 16 <?php class Class1{ private function __construct(){ print "This is class 1"; } } class Class2 extends Class1{ function __construct(){ parent::__construct(); } } $test = new Class2(); ?>
  9. Which classes instances are you passing to LoadBackend? Because I can recommend a few things based on what you're doing..
  10. Akon is the reincarnation of Einstein, he's music is science of the mind.. or its just plain crap.
  11. This is kind of hard to explain, but since we are all programmers maybe you can share some of the things I feel here. When I get on my computer, I feel like I am a scientist, mathematician, designer, architect, thinker, builder, creator, all these things at once. I Feel like i have been given an endless amount of powerful languages to build what I want, when I want. I also know that when I am programming I am being myself, I am in my own little zone and doing my thing. The best part is that YOU ARE ALWAYS learning something new, and when your spending hours just for that "OHHH NOW I GET IT" moment. I love how I can contribute to projects and even build my own projects and be a leader, be the guy who makes the choices, and build it yourself also. I don't know about you guys, I am sure its similar feeling if not even better for you guys. I have been alone on my recent project P2Pmovie, and I found myself thinking, building, trying new things and going in the deep end of stuff, and I couldn't wait to get back home the other day and start my computer to work on my project again. Feels Good Man. How about you guys?
  12. There is another group of people who loudly call themselves hackers, but aren't. These are people (mainly adolescent males) who get a kick out of breaking into computers and phreaking the phone system. Real hackers call these people ‘crackers’ and want nothing to do with them. Real hackers mostly think crackers are lazy, irresponsible, and not very bright, and object that being able to break security doesn't make you a hacker any more than being able to hotwire cars makes you an automotive engineer. Unfortunately, many journalists and writers have been fooled into using the word ‘hacker’ to describe crackers; this irritates real hackers no end. Man speaks truth.
  13. Its risky, because the format needs to be exact. <?php $data = 'P234324, 2011-03-23 12:34:37\n P234434, 2011-03-23 13:34:36 \n P438794, 2011-03-23 14:34:36 \n P238924, 2011-03-23 15:34:36 \n'; $split=explode('\n',$data); $data=array(); for($i = 0;$i<=count($split);$i++){ list($variable,$value) = explode(',',trim($split[$i])); $data[$variable]=$value; if($data[$variable] == ""){ unset($data[$variable]); } } print_r($data); ?>
  14. HAHAHAAAHAHHAAH.... Imagine the next 20 years!!
  15. The term is misunderstood by the media. I consider people like Linus Torvalds, Guido Van Rossum and Larry Wall to be true hackers, not these script kiddies the media harps on about. Guido van Rossum is the main man. Only because he is the author of my favorite computer language, I heard he works for Google, so maybe.. just maybe... we can shake hands. But Yes, script kiddies is what I would call them too, its actually funny I have met a few of these "bad asses", and they are no more advanced then some of our beginners in the php help section. edit: Damn it though, Google has everything.
  16. edit: nvm. Have you tried var_dump($_POST)
  17. Why is that everytime some idiot overloads a website's server with traffic he is considered a hacker? The media honestly thinks that we have softwares to just walk in the front door and take all the information we want. I laugh hard when i hear about HACKERS 15 year olds claiming themselves God amongst the underground community for "High Profile Attacks". They "attack" or "hack" websites and then threaten to release user information.... Recently on the news some kids called the LulzSec apparently hacked into CIA, and other websites. I remember back in the day we use to take down 2-3 forums because of week security points, but mainly from just creating a phishing site and luring the moderators in. It was that simple, There's no such thing as a software to "hack" into anything. I can send over thousands of junk mails at once from a simple PHP loop, and yet Hotmail still hasn't patched it. Just try it, you'll see what I mean. I think the word "Hacker" is over rated & exaggerated...
  18. lol, the opposite? <link type="text/css" rel="stylesheet" href="<?php echo WEB_ROOT; ?>css/main.css" />
  19. Sorry to be off topic, but The Little Guy, were you not a staff member? Guru? I can't remember..
  20. After this post I'll vote, In my opinion theres a benefit to both. At my competition there was about 30-40 thousand spectators, it was insane and the level of focus needed was 100% or your done. So I loaded up my Shure head sets , and I put it on noise cancelling mode, I amped the music and honestly my focus went straight to the gutter. The rest of my body was in tune with the music while I needed my focus to be on the programming. I turned it off and went silent mode, all I can hear was my own heart beat and breathing harddd, this to me was the focus I needed to win. For non-competition purposes and if your the type of guy who can't stare at a screen all day long and need some sort of "fun" involved while programming, then the music might help. Sometimes I get carried away and just start dancing haha. However I think all music nowadays suck, I am a younger guy around here, still in me teens, and what we are supose to enjoy is completely garbage sorry to say.
  21. I see, I am going to take your advice on this also. Thanks.
  22. hahahaha, Those wash board abs of yours do come with a price my friend..
×
×
  • 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.