Jump to content
MakeWebGames

Recommended Posts

Posted

Im trying to make a mod of mine put someone in jail after failing something. But the fallowing code below doesn't seem to be working. Could anyone tell me why? and provide a fix for it...

$jailreason= ('Reason Here');

$db->query("UPDATE users SET jail_reason=$jailreason WHERE userid=$userid");

Posted

Re: Jail_Reason

* PHP-Games >

* Webdev and programming (Non Game related) >

* PHP/MySQL >

* PHP Databases >

* Post reply ( Re: Jail_Reason )

 

Just in case ya didn't notice what forum this was ;)

Posted

Re: Jail_Reason

Luckily Floydian saved me time in saying that, but seriously... post in the correct sections please, it saves us all allot of time that we could have spent doing much more useful things.

**Topic Moved**

Posted

Re: Jail_Reason

Or...

$JailReason = 'Some Reason...';
$db->query(sprintf("UPDATE users SET jail_reason=%s WHERE userid=%d", addslashes($JailReason), $userid));

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...