Jump to content
lancaster123

Help With PIREP Submitting

Recommended Posts

Hi Guys,

What im trying to do is when a manual PIREP is submitted on my website I need the arricao to go into a custom field in my aircraft table called location. I have tried changing this section in PIREPData.class.php but it don't work:

$sql = "INSERT INTO ".TABLE_PREFIX."pireps(
 `pilotid`,
 `code`,
 `flightnum`,
 `depicao`,
 `arricao`,
`location`,
 `route`,
 `route_details`,
 `distance`,
 `aircraft`,
 `flighttime`,
 `flighttime_stamp`,
 `landingrate`,
 `submitdate`,
 `accepted`,
 `log`,
 `load`,
 `fuelused`,
 `expenselist`,
 `source`,
 `pob`,
 `exported`,
 `rawdata`)
 VALUES ( {$pirepdata['pilotid']},
 '{$pirepdata['code']}',
 '{$pirepdata['flightnum']}',
 '{$pirepdata['depicao']}',
 '{$pirepdata['arricao']}',
'{$pirepdata['arricao']}',
 '{$pirepdata['route']}',
 '{$pirepdata['route_details']}',
 '{$pirepdata['distance']}',
 '{$pirepdata['aircraft']}',
 '{$pirepdata['flighttime']}',
 '{$flighttime_stamp}',
 '{$pirepdata['landingrate']}',
 NOW(),
 ".PIREP_PENDING.",
 '{$pirepdata['log']}',
 '{$pirepdata['load']}',
 '{$pirepdata['fuelused']}',
 '0',
 '{$pirepdata['source']}',
 '{$pirepdata['pob']}',
 {$pirepdata['exported']},
 '{$pirepdata['rawdata']}')";

Any Ideas how to simply put the arricao in the arricao field and in my extra location field in my SQL table?

Many Thanks

Scott

Edited by lancaster123

Share this post


Link to post
Share on other sites

Looking at the insert on the surface it seems like it should work. Is the spelling of the column name not the same in the table as in the code possibly? Is the pirep not submitting at all, or is it just missing that field when it submits?

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...