3.17  Useful MySQL scripts provided with piWebCAT

I have provided a suite of SQL scripts to aid database data manipulation.  Their names are listed left.

They are downloadable from the website as a zipped folder.

See:  http://piwebcat.g3vpx.net/files/LibrarySQL.zip

They are also in folder:   /home/pi/LibrarySQL on the SD card. ( Download with FileZilla for use on PC with MySQL Front.)

They need editing before use to set rig names etc.

The scripts are run in MySQL Front by right-click on the radios database item and then Import > SQL file.

A prior database backup is strongly suggested.



The start of this script is shown below.

SET @source_rigname = "FTdx101D";

SET @new_rigname = "NEWNAME;

CREATE TEMPORARY TABLE tmp SELECT * from buttonshl WHERE rig = @source_rigname;

ALTER TABLE tmp drop id; # drop autoincrement field

UPDATE tmp SET rig = @new_rigname;

INSERT INTO buttonshl SELECT 0,tmp.* FROM tmp;


CREATE TEMPORARY TABLE ...   is repeated for seven more tables

@source_rigname  and  @new_rigname are MySQL variables.

You need to substitute the name (rig field) of the rig you are duplicating for my FTdx101D

and your new rig name (rig field) for my NEWNAME.

Then save the script.

Then run MySQL Front on the database.
Right click the radios database item, top left. Then Import, then SQL and then select the script file

and run it.

VFOA / Main etc scripts are provided because modern Yaesu rigs use Main / Sub rather than
VFOA / VFOB and this is reflected in the command syntax of Hamlib.

So, if you want to use my FTdx101D-H configuration as the basis for rigs that use VFOA / VFOB
in Hamlib then you need make the changes.