Jake Posted January 30, 2007 Posted January 30, 2007 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. Quote
UCC Posted January 30, 2007 Posted January 30, 2007 Re: Simple MySQL Insert error. I'm only familiar with 2.0 code but here are some questions that could lead to something. Did you intend to not use any MF query variables? What is the $my array? Quote
spellbyte ® Posted January 31, 2007 Posted January 31, 2007 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); Quote
Jake Posted January 31, 2007 Author Posted January 31, 2007 Re: Simple MySQL Insert error. I have tried that, and it still does not work. Quote
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.