PHP Version Display Code

Notes on the new SeedCode Complete template for FileMaker 13
Posts: 72
Joined: Mon Feb 04, 2013 11:54 am
PostPosted: Wed Feb 24, 2016 4:37 pm
I have very little knowledge of PHP code but I am using a modified version of the build.php file that is used in the sample SC file.

if (isset($_GET['build']) && $_GET['build'] != "") {
$build = $_GET['build'];

It appears that the 'build' variable being pulled from the SC app is formatted to something like 4.29 which is in a table in the app.

Everything is working as it should except that I want to display a longer version number like 4.29.01. I changed the build number to this format within the table but have to use quotes - "4.29.01" to make the calculation work.

The .php script does pick up the number but still displays 4.29 and not 4.29.01.

Any idea how to make this work?

Thanks. Ken
Posts: 72
Joined: Mon Feb 04, 2013 11:54 am
PostPosted: Wed Feb 24, 2016 5:05 pm
Never mind. I think I will just go with a number friendly version label like 5.12. That will work without quotes or anything special and give me enough room to track changes often enough. Lots of room until I hit 6.00. In my change log I will simply use 5.1.2 and so on.

This makes things simple to understand and gives plenty of room to grow to the next major build.

Looks great in the app as well.

Thanks. Ken
SeedCode Staff
SeedCode Staff
Posts: 186
Joined: Tue Sep 22, 2015 2:27 pm
PostPosted: Thu Feb 25, 2016 10:08 am
Sounds great, Ken.

Yes, the php file is comparing numbers when checking whether the version is current or not. So, the additional characters from the second decimal on get dropped. I agree that using the number friendly version label is your best option here. Glad this has worked for you!

All the best,

Return to SeedCode Complete 13

Who is online

Users browsing this forum: No registered users and 1 guest

cron
(855) SEEDCODE
support@seedcode.com
Follow us: