PHP& MySQL Video Playlist (JW Player)

I think the issues lies somewhere here in the video_albums table, in the javascript:

document.getElementById('videoName').value = VideoDataArray[0]; document.getElementById('videoDescription').value = VideoDataArray[1];

and maybe here too:
[php]while( $row = mysql_fetch_row($results) ) {
print “<OPTION VALUE=’” . $row[1] . “|” . $row[3] . “’” . “>” . $row[1] . “\n”; //NOTE: row(1) is videoname row(3) is descriptions field
}
print “<OPTION VALUE=“Enter a NEW VIDEO NAME here…|VIDEO DESCRIPTION goes here…”>Add New Video!\n”;[/php]

Yes! Change this:

$row[1] . “|” . $row[3] .

to

$row[1] . “|” . $row[2] .

OK, I fxed this line

 print "<CENTER><OPTION VALUE='" . $row[1] . "|" . $row[2] . "'" . ">" . $row[1] . "</OPTION>\n";  //NOTE: row(1) is videoname row(3) is descriptions field

The second row[2] was set to three. At least it nows pull from the correct place. But still not DB updated.

Hmmm, what does the query look like now? Does it contain any odd quote, quotes, slashes in the text to be written? I can’t see anything wrong…

Looks fine:
[php]UPDATE videos SET videoName='video02.flv wsd ', videoDescription=‘Blah Blah dddd’, lastUpdated=‘2012-02-08 04:43:42’ WHERE videoName = 'video02.flv wsd ’ [/php]

I was searching around and found a way to get the error.

Use that echo line (Echo the $QUERY and die thingy). This will give you the actual query.
Then log into your PHPAdmin site where you look at your tables and all.
Then, select the QUERY option and past your query into it with the starting and ending quotes.

Execute the query and it should tell you where the error is.

Rough way to get an error, but, it seems to work for several people on the net…

Let me know…

Here’s how the DB content looks like now:

I did,…no errors.

crazy, no errors, but, no update???

It must be the way we are setting the data inside the query. Let me test my version and see if I can duplicate your error.

Here’s the link in the server: maranatha.tv/VIDEOS/administrar/videoAdmin.php

I believe the problem is one of these three lines.

[php] // loop through the results, creating an option list, I am just using Name and Description for this test…
while( $row = mysql_fetch_row($results) ) {
print “<OPTION VALUE=’” . $row[1] . “|” . $row[2] . “’” . “>” . $row[1] . “\n”; //NOTE: row(1) is videoname row(3) is descriptions field
}
print “<OPTION VALUE=“Enter a NEW VIDEO NAME here…|VIDEO DESCRIPTION goes here…”>Add New Video!\n”;[/php] … probably the last OPTION line.

You told me that the program shows the ones from the dropdown in the correct fields now.
That means that the code you just sent is good and works. It is something in the Update.php part.

I am comparing it right now to my working code…

OK.

Try this, run your video page and use something new for testing,

Use like “xxxxx” for the video name and “yyyy” for description, etc… No special characters and see if it updates. to check for the update, just refresh your page… Let me know what happens.

I have done that a million times

Remember that the drop down list in the video page pulls from video_albums table, not videos table… and they are not connected in any way as of now.

Let’s do this… since yours is working, why don’t you paste your latest code for both admin pages… maybe we are just something simple… I am sure of this.

LOL, I’m lost… You have 3 parts to this:

  1. the Player, which is done for right now…

  2. the Video Admin part , which I thought we were working on.

  3. the Playlist Admin part, which we haven’t started yet.

SOoo, where are we… (I’m tired and crash’n soon I think!)

We are at the videoAdminUPDATE.php (where we are having the issue) and videoAdmin.php which sends the collected data to videoAdminUPDATE.php].

We can call it a night. Maybe in the morning when we wake up, the brain lights up with the solution… it happens to all the time. I thik that sometimes when I go to sleep, my brain works on adouble shift… LOL.

Okay, that IS where I am. Both of those pages, VideoADMIN.php and VideoADMINupdate.php go together.

Oh, and the VideoADMIN page should be pulling data from the Videos table, not ALbums table. The player or JW-viewer should be pulling from the Albums table.

Hold on a moment, my working live code is out on a working site. I will see if I can grab it for you…

Sponsor our Newsletter | Privacy Policy | Terms of Service