I have the following MySQL table which I want to appear as a simple checkbox template variable.
// Basic MySQL structure
id (primary key, int, auto-increment)
airportcode (varchar (12))
airportname (varchar (255)
I have created a checkbox template variable;
// template variable setup
name: tv_airport
input type: checkbox
input options:
@SELECT airportname FROM airports ORDER BY airportname ASC
However I do not want to use `AirportName` for both the storage and visual, I want to store `AirportCode` and use `AirportName` for the visual.
So it stores "AirportCode" in the DB/TV but shows AirportName to the user.
// Something like this (not exact/correct);
<input value="airportname" name="airportcode" />
This way I do not have to do any reverse engineering to find out what Airport was actually selected later on.
Is there a way to do this?
Another question I have is, am I meant to make the checkbox comma-seperated, and what is the benefit of doing that?
Thanks.