Dethman Posted January 12, 2008 Share Posted January 12, 2008 function PPT($id){ $sql="UPDATE `user_users` SET `PPT` - 1"; } any help wold b awsome ~Dethman~ Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted January 12, 2008 Share Posted January 12, 2008 function PPT($id){ $sql="UPDATE `user_users` SET `PPT`='-1'"; } You mean that? If so, what's the point of the $id parameter? Maybe: function PPT($id){ $sql="UPDATE `user_users` SET `PPT`='$id'"; } Quote Link to comment Share on other sites More sharing options...
Dethman Posted January 12, 2008 Author Share Posted January 12, 2008 I need to Minus 30 from the PPT Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted January 12, 2008 Share Posted January 12, 2008 Uh..I think: function PPT($id){ $sql="UPDATE `user_users` SET `PPT`='PPT-30'"; } Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted January 12, 2008 Share Posted January 12, 2008 Advice: use a more descriptive heading and explain what your problem is in your post, we're not mind readers Regards ACE Quote Link to comment Share on other sites More sharing options...
twostars Posted January 12, 2008 Share Posted January 12, 2008 explain what your problem is in your post, we're not mind readers We need to code a PHP script to read minds! Who is with me!? Quote Link to comment Share on other sites More sharing options...
dooper3 Posted January 12, 2008 Share Posted January 12, 2008 @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!) Quote Link to comment Share on other sites More sharing options...
Barand Posted January 12, 2008 Share Posted January 12, 2008 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. Quote Link to comment Share on other sites More sharing options...
twostars Posted January 12, 2008 Share Posted January 12, 2008 @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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.