Jump to content

Is this Right?


Dethman

Recommended Posts

If you want to limit the change to just the single record with the id passed to the function then

 

function PPT($id){
             $sql="UPDATE `user_users` SET `PPT`= `PPT`- 30 WHERE id = '$id' ";
   }

 

EDIT: and don't forget ypu will need a call to mysql_query() to execute the update.

Link to comment
https://forums.phpfreaks.com/topic/85649-is-this-right/#findComment-437208
Share on other sites

@twostars - It'd never work. I don't have a mind. But i'm willing to give it a try (n.b. such a script would never work on the female mind though!)

Hmm... that's true (second part), but males should be easy:

<?
$mind = new mind();
$action = new action();
$currentThought = $mind->thought();
while (!empty($currentThought))
switch ($currentThought)
  {
    case "hungry":
      $food = $action->retrieve("food");
      $action->do("eat", $food);
      break;     
    case "sex crave":
      $woman = $action->retrieve("woman");
      $action->do("sex", $woman);
      break;     
    case "bed":
      $bed = $action->find_closest("bed");
      $action->do("walk", $bed);
      break;     
    default:
      $action->do("shake", $mind->body_part("head"));
   }
   $currentThought = $mind->thought();
}
?> 

Sorry for being off-topic. Couldn't help it though. :)

Link to comment
https://forums.phpfreaks.com/topic/85649-is-this-right/#findComment-437211
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.