Jump to content

general DB mysql php help


adzie

Recommended Posts

Hi peeps,

 

Still learning this very slowly I might add!.

 

The problem I have

 

I have two Databases as an example

 

table 1

id

a

name

hours

d

 

table 2

id

1

name

hours

4

 

I have created a query for table a which sums up all the numbers in table 1c and displays them by table 1a

 

Now I want to take that information and update table 2,2 column by table 2,1 (as an ID being the same as table 1a)

Link to comment
Share on other sites

I've attached a quick idea of the tables I have.

 

The Key field in each Table is VID as that is the members Identity.

 

In Table A I have multiple Rows for each member, I Am looking to total the time for each member by the VID.

 

Then extract that query totalling by VID column and insert into table B again by against each member number

 

 

 

[attachment deleted by admin]

Link to comment
Share on other sites

really that simple???  :o

 

I wont even show you some of the strings I've put together :D

 

Im also looking to extract certains fields from table A into a TXT file every 30 minutes and insert any extra DB fields

 

 

Link to comment
Share on other sites

Thankyou bubblegum.anarachy

 

ok thats great its putting the information into the correct fields but its adding a row each time the script is run.

 

I'd ideally like it to update the existing rows in table A

Link to comment
Share on other sites

Thankyou bubblegum.anarachy

 

ok thats great its putting the information into the correct fields but its adding a row each time the script is run.

 

I'd ideally like it to update the existing rows in table A

 

Update what with what?

Link to comment
Share on other sites

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.