mattia Posted July 13, 2012 Report Posted July 13, 2012 Hi I wrote this code to get the hours of a pilot on a single airplane in profile_stasts.tpl but don't work <?php $query = 'SELECT flighttime FROM '.TABLE_PREFIX.'pireps WHERE aircraft = 6 AND pilotid = '.Auth::$userinfo->pilotid'; --------------->I believe that the error is here $result=DB::get_row($query); echo $result->distance; { } ?> Can you help? many thanks Regards Quote
SouthwestVA Posted July 13, 2012 Report Posted July 13, 2012 <?php $query = 'SELECT flighttime FROM '.TABLE_PREFIX.'pireps WHERE aircraft = 6 AND pilotid = '.Auth::$userinfo->pilotid.'; $result=DB::get_row($query); echo $result->distance; { } ?> you for got a . i think try that. Quote
mattia Posted July 13, 2012 Author Report Posted July 13, 2012 what? sorry but I did not understand Quote
SouthwestVA Posted July 13, 2012 Report Posted July 13, 2012 AND pilotid = '.Auth::$userinfo->pilotid'; that part, to echo inside of a php code its '.xxx.' you for got the 2nd dot It should be this: AND pilotid = '.Auth::$userinfo->pilotid.'; Quote
mattia Posted July 13, 2012 Author Report Posted July 13, 2012 dont work this error Parse error: syntax error, unexpected T_LNUMBER in /var/www/virtual/italianivolanti.it/htdocs/iv/core/templates/profile_stats.tpl on line 27 Quote
SouthwestVA Posted July 13, 2012 Report Posted July 13, 2012 <?php $query = 'SELECT flighttime FROM '.TABLE_PREFIX.'pireps WHERE aircraft = '6' AND pilotid = '.Auth::$userinfo->pilotid.'; $result=DB::get_row($query); echo $result->distance; { } ?> try that 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.