[solved] Link element format changes from J! 1.5 to 3.31 (sql query help)

mattpayne11

Member
So, I've been pretty lazy to update my site and that's my fault; however, when I updated my site from J! 1.5 to 3.31, I noticed a problem with the way in which data is stored for the Link element in phpmyadmin.

Formerly, links had the following syntax:

Link title|-|URL

For example:

Forecast|-|http://forecast.weather.gov//MapClick.php?site=DEN&textField1=39.18721&textField2=-106.4756

Now, the syntax is like this:

{"label":"link title","link":"URL"}

For example:

{"label":"Forecast","link":"http://forecast.weather.gov//MapClick.php?site=DEN&textField1=39.18721&textField2=-106.4756"}

So, as you can see, it would seem that the only way to transition my table from J1.5 to J3.3 would be to do a few sql queries to fix the issue; however, I'm finding that the "Replace" function sql query can only help me with the first part of the string and not the last part (adding the "} to the end of the string). Any help is appreciated in solving this issue.
 
The new format is JSON.

How many records do you need to convert? Not sure what people have done in the past but as it's a one off I would run a little PHP script to do it.
 
The new format is JSON.

How many records do you need to convert? Not sure what people have done in the past but as it's a one off I would run a little PHP script to do it.

I have over 6,000 records and used the link element 5 times, so about 20,000 or so records... :\
 
So, just to update you... I decided to export the table as a CSV file, edit it with ASAP Tools in Excel, and then replace the table. Worked like a charm.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top