>I have an embedded object in my webpage which will play a DVD movie right in
>the page (provided you have a disc in teh dvdrom drive). One of the
>javascript methods attached to this object returns the current time. OK, on
>to the php/mysql part. I have a mysql database which has a table to catalog
>camera shots digramed like so:
>___________
>|*shot_num |
>| start_time |
>| end_time |
>|__________| * = primary key
>
>During play, I have a javascript function which continuously gets teh
>current time and puts it in an input field called cur_time (clever huh?).
>So my question is... what is the best way to have a second field called
>shot_num which is continuously changing? It can't be good to query the
>database continuously, even if it is a small query, can it? What is a good
>stratagy to work with here? I'm still a bit of a novice with php/mysql, so
>be gentle.
If you have only a *FEW* (like, under a hundred) "shot_num" in a single
movie, just do this:
<?php
$query = "select shot_num, start_time from whatever order by shot_num";
$shots = mysql_query($query) or error_log(mysql_error());
echo "<SCRIPT LANGUAGE=JavaScript>\n";
while (list($shot_num, $start_time) = mysql_fetch_row($shots)){
echo " shot_num[$shot_num] = $start_time;\n";
}
echo "</SCRIPT>\n";
?>
Now you can just look up the shot_num in JavaScript.
You may want to switch the array around or whatever it takes to make
JavaScript capable of finding/searching the shot_num/start_time lookup.
--
Like Music? http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro). Need to record live events (mixed already) to stereo
CD-quality. Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff. Zero (0)
post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php