Jump to content

Wife

Trade With Caution
  • Posts

    848
  • Joined

  • Last visited

  • Days Won

    2
  • Feedback

    66.7%

Everything posted by Wife

  1. Wife

    Rate my code.

    boss tell bad class structure i tell i fuck boss wife
  2. protected function generateCode($num) { return base_convert($num, 10, 36); } public function createCode($url) { $url = trim($url); if(!filter_var($url, FILTER_VALIDATE_URL)) { return ''; } $sth = $this->dbh->prepare('SELECT code FROM links WHERE url = :url'); $sth->bindParam(":url", $url); $sth->execute(); if(!$sth->rowCount() == 0) { return $sth->fetchColumn(); } else { $sth = $this->dbh->prepare('INSERT INTO links (url, created) values (:url, NOW())'); $sth->bindParam(":url", $url); $sth->execute(); //Generate code $code = $this->generateCode($this->dbh->lastInsertId()); $sth = $this->dbh->prepare('UPDATE links SET code = :code WHERE url = :url'); $sth->bindParam(":code", $code); $sth->bindParam(":url", $url); $sth->execute(); return $code; } } public function getCode($code) { $sth = $this->dbh->prepare('SELECT url FROM links WHERE code = :code'); $sth->bindParam(":code", $code); $sth->execute(); if(!$sth->rowCount() == 0) { return $sth->fetchColumn(); } return ''; } Feel free to use this. It's for URL shortening.
  3. i ask boss what mean
  4. kms pc+1
  5. he has told us he is homo. i would block him on all forms of contact.
  6. Now I can die as a happy man.
  7. 1. me 2. myself 3. i
  8. did not read but absolutely not..
  9. Wife

    help me!!!!

    No, no and no. First I was unable to get the error even with false details, now it gives me the error I want when false details. But still wont print my debug function.
  10. Wife

    help me!!!!

    Yes, but it still wont print the debug_Connection() function.. I missed the dbname= in the PDO(), now it also gives me error IF the DB wont exists, but doesnt give me a connection succeed message when I try to print it.
  11. ok im trying to learn some PHP and i has problem if i change the db password to something else than it is it will give me an error, but it still wont connect with the right details pls help plox my connection class class connection { protected $db_connect; public $db_username = 'root'; public $db_hostname = 'localhost'; public $db_database = 'test'; public $db_password = ''; function db_connection() { try { $this->connection = new PDO("mysql:host=$this->db_hostname;$this->db_database", $this->db_username, $this->db_password); $this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); return $this->connection; } catch(PDOException $error) { echo $error->getMessage(); } } function debug_Connection() { if($this->db_connect == true) { echo 'Connection debugged.'; } } } $test = new connection; $test->db_connection(); pls help im stuck
  12. lol ur a meme in the shitposting department.
  13. agree rep++
  14. come at me i kill for living i good killer kill alot fuck off
  15. agree should fix fast fucking annoying
  16. ... osbot keeps telling me this stupid shit. please remove. E. Also what the heck does osbot has to do with my windows.. i just had a window cleaner come by..
  17. im fat
  18. it's funny how you are playing with a very high sensitivity, but never over compensate your aim while flicking, always stoping on point :3
  19. Im way more concerned about my 2014 S-Klasse being rusty.
  20. I've suspected for a long time that my wife is cheating on me. Often her phone rings, and she looks at it but doesn't answer the call. She is often going out with "girls", and when I ask who is she going with, she tells me that I don't know them. I've tried to look out of the window, when she comes back home with a taxi, but she always walks the last block home. I only hear a car driving away, I doubt it's even a taxi. So yesterday evening, I decided to check it out. I went to the bushes next to the parking slots with my hunting rifle and camo-outfit. After few hours of waiting, a Toyota pulled over and I saw my wife kissing a man totally unknown to me. I changed my position to behind my Mercedes-Benz, and the I saw it, rust on rear fenders. What do you think, should I try to fix the rust or change the fenders? Thanks.
  21. thats the point..
  22. Finally, I am happy to anounce my new product, AprOne Wireless Extension cord. Signal up to 25 meters. Orders via PM. 9.99€ / unit
×
×
  • Create New...