I have these values in my SQL database, I want an output this way and this file in the browser using PHP
Database structure with the values I want on the output My attempts, although it does not help you at all: pastebin.com/6tCNbpY4
DATABASE schedule
TABLE stream_playlist
id streamname | playlistname | repeat | scheduled
=====================================================================
1 stackoverflow | plname1 | true | 2009-12-11 16:25:05
2 other_stream | plother2 | false | 2011-11-11 17:01:11
TABLE videos_for_stream_playlist
id | streamname | src | start | length
================================================================
1 | other_stream | http:/local/demo.mp4 | 60 | -1
2 | stackoverflow | C:\sample.mp4 | 0 | 20
3 | other_stream | otherlocation/mystream | 0 | -1
The output must be written to a .txt file and displayed in the browser when executing the PHP script.
Videos can be sorted by id
.
<smil>
<body>
<stream name="stackoverflow"></stream>
<playlist name="plname1" playOnStream="stackoverflow" repeat="true" scheduled="2009-12-11 16:25:05">
<video src="C:\sample.mp4" start="0" length="20"/>
</playlist>
<stream name="other_stream"></stream>
<playlist name="plother2" playOnStream="other_stream" repeat="false" scheduled="2011-11-11 17:01:11">
<video src="http:/local/demo.mp4" start="60" length="-1"/>
<video src="otherlocation/mystream" start="0" length="-1"/>
</playlist>
</body>
</smil>
How can I do this? I can not give a functional loop inside another loop , everything duplicates.