Jump to content

[SOLVED] Pilot List -> Rank Abbreviation


Guest

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
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...