I didn't even notice that there was a URL in the link. Good catch. However, now that requires me to remodify the code that I put up. I am going to edit that post to have the correct playlist_xml.php. This file will place the URL to the video in it and is multi-server compatible.
As for your second question (regarding the ORDER BY RAND();), I would NOT recommend that you do that. The way that function works is it determines the number of rows within the table and then generates that many random numbers (so, if there are 1000 rows, 1000 random numbers are generated). It will then choose the lowest of those random numbers. The problem with this is the process of diminishing returns. As the number of videos on your site grows, you will be requiring your server to work harder and harder for EACH video that you display. The end result of that will a mySQL crash (crash as the result of the following: number of videos [let's use 1000] x number of random numbers [would be 1000] x number of simultaneous visitors [let's use a small number and say 200]).
Note: In my example above, that's 200,000,000 (2 Hundred Million) numbers generated for 200 people. That's a lot of work.




Reply With Quote
Bookmarks