I have the following coding and want to display the value of "ChannelName" on textbox 1. I have attached the blocks here. Please tell me how to fix it.
<?php
include './config2.php';
$sql = "SELECT *
FROM InternetRadio_Link
WHERE ChannelNo IS NOT NULL
ORDER BY ChannelNo";
$result = $pdo->query($sql);
foreach($result as $row) {
echo $row["id"],$row["ChannelNo"],$row["ChannelCounty"],$row["ChannelName"],$row["ChannelURL"],$row["ChannelPlayPic"];
}
?>
11Germanyrbb Fritz - Berlin 102.6 FMhttp://fritz.de/livemp3http://8.192.62.65/booked/InternetRadio/Germany.png22FranceRadio France Culturehttp://icecast.radiofrance.fr/franceculture-midfi.mp3http://8.192.62.65/booked/InternetRadio/France.png33United StatesWFDU Retro Radio 89.1 FM - Teaneck, NJhttp://peridot.streamguys1.com:5350/ihearthttp://8.192.62.65/booked/InternetRadio/UnitedStates.jpg44AustraliaORF oe1campushttp://orf-live.ors-shoutcast.at/campus-q2ahttp://8.192.62.65/booked/InternetRadio/Australia.jpg55United KingdomCapital London 95.8 FMhttps://media-ice.musicradio.com/CapitalMP3http://8.192.62.65/booked/InternetRadio/UnitedKingdom.jpg66ThailandVoice from the Navy, FM 88.5 Sor.Tor.1, Wangnanthayuthayahttp://radio12.plathong.net/7346/;stream.mp3http://8.192.62.65/booked/InternetRadio/Thailand.png117SingaporeOne FM 91.3 - Singaporehttps://playerservices.streamtheworld.com/api/livestream-redirect/ONE_FM_913.mp3?dist=worldradiomaphttp://8.192.62.65/booked/InternetRadio/Singapore.jpg128ItalySimply Italia Radio - Lazio 93.1https://stream4.xdevel.com/audio1s975968-807/stream/icecast.audiohttp://8.192.62.65/booked/InternetRadio/Italy.png139PhilippinesPhilippine Broadcasting Service (PBS)https://stream.zeno.fm/qnt98p5m108uvhttp://8.192.62.65/booked/InternetRadio/Philippines.jpg1410MalaysiaBFM 89.9 - Kuala Lumpurhttp://playerservices.streamtheworld.com/api/livestream-redirect/BFM.mp3http://8.192.62.65/booked/InternetRadio/Malaysia.jpg
Doesn't look like a dictionary, just a list of URLs. You would need to use text manipulation to extract the channel names if you can . May be better to look at your query again...
I actually changed the display method, so I want to use the dynamic component to show the list. But I got the following error. Can you please tell me how to fix it?
Thank you very much, and I learned a lot from you. However, if I want to display a flag of each country and its channel name (see attached). Each country flag is in the exact location "http://8.192.62.65/booked/InternetRadio/country.png" where the country name is referred by JSON file "ChannelCounty". When clicking the respective country flag, it will play the song and the URL of the song is in the JSON file "ChannelURL". How can I do that?
The screen is according to the "aia" file you provided.
Finally, I can load the country flags and play their radio respectively. But the App responds a bit slowly. May I know what I can improve it? getCh2.aia (38.0 KB)
It is slow because of the time it takes to get all of the images (even though they are small in size). Just remove the image block and replace it with an empty test block, you will see the difference.
Might be better to download the images to the device on first run, then load them to the list view from the local files. (or get all the images and upload them to the media folder - assets - in the app)