Jump to content
MakeWebGames

Simple MySQL Insert error.


Jake

Recommended Posts

I dont know why this isn't working, i've checked all of the field names from the database. And even copied and pasted from other Inserts, but its not working:

 

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

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

mysql_query("INSERT INTO firmwars VALUES('', '{$my['fID']}', '{$my['fNAME']}', '{$wf['fID']}', '{$wf['fNAME']}', '0')",$c);

 

It is for my gangs mod.

I get not error, it just simply doesn't happen.

Link to comment
Share on other sites

Re: Simple MySQL Insert error.

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

$mf=mysql_fetch_array($myfirm);

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

$wf=mysql_fetch_array($warfirm);

mysql_query("INSERT INTO firmwars 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.

×
×
  • Create New...