Guest Posted June 6, 2011 Report Share Posted June 6, 2011 Heya, I'm trying to configure my pilots list on my site. I can get the rank image to appear next to the name, however I'm not sure how to make the rank ABBREVIATION appear there instead. I've made a row in my rank table in my Database with the abbreviations in it (I.E, Pilot Officer = PLTOFF), however I'm not sure how I can echo that as a query on the table. I can get the whole rank to appear with: <?php echo $pilot->rank?> Shows as: Pilot Officer John Smith or the image to appear with <img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /> Shows as: (Image) John Smith However i'm not sure how to echo the rankabbrev row in my phpvms_ranks table. So it appears as: PLTOFF John Smith Any help will be greatly appreciated! Regards, Nedra Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted June 6, 2011 Administrators Report Share Posted June 6, 2011 Try echo $pilot->rankabbrev That might work, I can't remember if I only selected certain fields or not Quote Link to comment Share on other sites More sharing options...
Guest Posted June 7, 2011 Report Share Posted June 7, 2011 Try echo $pilot->rankabbrev That might work, I can't remember if I only selected certain fields or not Hi Nabeel, No, I tried that yesterday. I'm not sure where the query to pull from the rank table is from (to get the images), because I can't find it anywhere. I think when I pull the $rank, it pulls it from the Pilot table (because in the pilot table there is a rank row, with the full rank), but the rank abbreviation isn't there, it's under the rank table. Many thanks Quote Link to comment Share on other sites More sharing options...
beerguts Posted June 7, 2011 Report Share Posted June 7, 2011 You will need to add the rankabbrev cell to the SQL query in Pilot.Data.Class.php It's currently only asking for the rank image and payrate. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 7, 2011 Report Share Posted June 7, 2011 Thanks for that beerguts! Worked the charm. Cheers Quote Link to comment Share on other sites More sharing options...
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.