Jump to content

[SOLVED] Column 'offense' in field list is ambiguous - ?


MasterACE14

Recommended Posts

hi,

 

I'm having trouble with a MySQL query. I keep receiving this error:

Column 'offense' in field list is ambiguous

 

I have no idea what I have to do to fix this problem.

 

here's my code:

<?php
$sql = "UPDATE `Army` INNER JOIN `UserInfo` ON `UserInfo`.`id` = `Army`.`id` SET `offense` = `offense` + '$amount', `awakened` = `awakened` - '$amount', `UserInfo`.`magi_ava` = (`UserInfo`.`magi_ava` * 1) - '$price' WHERE `UserInfo`.`id` = '$id'";
mysql_query($sql) or die("Cannnot Buy Attack Soldier<br>" . mysql_error());

 

Any help is greatly appreciated.

 

Regards ACE

try this...

 

$sql = "UPDATE `Army` INNER JOIN `UserInfo` ON `UserInfo`.`id` = `Army`.`id` SET `Army`.`offense` = `Army`.`offense` + '$amount', `awakened` = `awakened` - '$amount', `UserInfo`.`magi_ava` = (`UserInfo`.`magi_ava` * 1) - '$price' WHERE `UserInfo`.`id` = '$id'";

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.