Jump to content
MakeWebGames

Gang War --- Help Needed


Jake
 Share

Recommended Posts

Here's what i have. I know that it's the INSERT function that's not working because i have separately printed the values i wish to insert, and they print correctly, so i think it may be my arrangement of the insert.

 

$warfirm=mysql_query("SELECT * FROM firms WHERE fID={$_GET['WID']}",$c);
$wf=mysql_fetch_array($warfirm);
$myfirm=mysql_query("SELECT * FROM firms WHERE fID={$_GET['ID']}",$c);
$mf=mysql_fetch_array($myfirm);

mysql_query('INSERT INTO `firmwars` (`f1id`, `f1name`, `f2id`, `f2name`, `wardays`) VALUES ('{$mf['fID']}', '{$mf['fNAME']}', '{$wf['fID']}', '{$wf['fNAME']}', '0'),$c);

 

I've tried endless variations of this code, but to no success, please help

Link to comment
Share on other sites

Re: Gang War --- Help Needed

It looks like you may be missing an end ' after the '0')

If that doesn't work, try this code.  I'm not making any promises but it's a thought. Again, you use a different query than I do.

 

mysql_query("INSERT INTO firmwars (f1id, f1name, f2id, f2name, wardays) VALUES ({$mf['fID']}, '{$mf['fNAME']}', {$wf['fID']}, '{$wf['fNAME']}', 0)",$c);
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.

 Share

×
×
  • Create New...