Jump to content

Recommended Posts

Hey everyone.

 

I'm quite new to PHP and I need help with my little project. I want to do something like this :

 

Scenario:

 

phpr.th.jpg

 

In first column I have movie clips with specific time each. I want to be able to transfer some clips with specified time into second one, sum their times  and save this selection in new row according to selected date.

 

Can somebody please give me some tips how this can be done?

I think from one table to another will be OK :)

 

I need three informations in both tables:

ID

movie name

movie time

st

In future I'll try to auto sum movie times in second column to know when exactly next one is starting, but as I said this is future :)

you could construct a select statement from table1 (source) then use the it with INSERT statment on table2 (destination)

 

INSERT INTO table2 select *.... from table1....

 

Hmm... So I can do something like this...

Display all source movies through the loop as links with specified Id in first column and when link is clicked INSERT command is activated right?

But is it possible using pure PHP to just select movie and then use arrow to transfer it to second column?

But is it possible using pure PHP to just select movie and then use arrow to transfer it to second column?

 

I believe you've got everything backwards or fumbled around .. as far as languages go.

 

You would use PHP.. to retrieve the movies and put them into these "columns".  I put columns in quotes because I'm talking about the image of two columns you gave.  As I'm sure you know, those columns (in the image) aren't representative of the database itself.  They are simply placeholders.  All PHP does is put the data into one of those place holders at the beginning of the page load.

 

Now, to move one of those "datas" to the other placeholder...using a button.  You would use Javascript.  That will be the only way... well there are options like Flash,Java,Ruby.etc.. but to make things easier.  This is a Javascript question.

 

So you've moved all the data from one placeholder to another... this doesn't mean ANYTHING for the database yet.  At this point you have 2 options.

 

1.) You can send the contents of the second placeholder to another PHP page which THEN adds/edits/inserts/ it into the database.

2.) You can use Javascript again to initiate AJAX to put that stuff in the database INSTANTLY.

 

I'll move this to Javascript now as you'll get better help there.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.