Jump to content
MakeWebGames

Attack Lost Problem


gurpreet

Recommended Posts

Say i attack my brother who is ID 2 this comes up if i lose.

 

You lost to ¨°ºO...:::[|<]@ © H[|]:::...Oº°¨. Unlucky, try again when you have trained more. and lost 0.0174758079991% EXP!QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'hospreason='Lost to Gurpreet' WHERE userid=2' at line 1

Query was UPDATE users SET hp=1,hospital=,hospreason='Lost to Gurpreet' WHERE userid=2

Thats messed up because it should say Lost to ¨°ºO...:::[|<]@ © H[|]:::...Oº°¨and its saying query error. Heres the query in attacklost.php.

 

$db->query("UPDATE users SET hp=1,hospital=$hosptime,hospreason='Lost to <a href=\'viewuser.php?u={$userid}\'>{$ir['username']}</a>' WHERE userid={$r['userid']}");

Any help would be greatly appreciated. Thanks

Link to comment
Share on other sites

Re: Attack Lost Problem

Try changing

$db->query("UPDATE users SET hp=1,hospital=$hosptime,hospreason='Lost to <a href=\'viewuser.php?u={$userid}\'>{$ir['username']}</a>' WHERE userid={$r['userid']}");

into (Note it might not work)

$db->query("UPDATE users SET hp=1,hospital=$hosptime,hospreason='Lost to [url='viewuser.php?u={$userid}']{$ir['username']}[/url]' WHERE userid={$r['userid']}");
Link to comment
Share on other sites

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