close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

move data from one table to another

Thread began 12/17/2009 6:53 pm by mr hankey | Last modified 1/15/2010 2:25 pm by mr hankey | 1346 views | 10 replies |

mr hankey

move data from one table to another

hi,

if i have my lead table and want to convert this to a sale, i need to move the data from the lead table keeping the assigned salesmanuserid to this but have it so it does not show in my leads table anymore instead now a sale.

i want to have a button in the leads details page which they click and and then moves it into the sales page?

can any webassist tech help with this?

many thanks

Sign in to reply to this post

Jason ByrnesWebAssist

It doesn't make sense to move the data from one table to another in this case.

the record can only be a lead or a sale right?

So create a column to designate the record as such.

all of the leads and sales are stored in one table, you have a column to designate the record as a lead or sale

using this column, you can create a where clause to search for all leads, and another to search for all of the sales.

Sign in to reply to this post

mr hankey

thansk jason, so create a column in the clients table with say "status" either "lead or sale" then filter out like you said?

many thanks

Sign in to reply to this post

Jason ByrnesWebAssist

Yes, exactly:
WHERE status='lead'

or:
WHERE status='sale'

Sign in to reply to this post

mr hankey

cheers jason

Sign in to reply to this post

mr hankey

hi jason,

just a quick one, by creating this column i need to be able to later in the database show a graph say from dynamic web charts or even just a basic report of lead conversion to sale by user?

how can this track this if it just changes from lead to sale in db?

many thanks

Sign in to reply to this post

mr hankey

also jason, say i have a products table, clients table and users table.

if i want to see clients assigned to users i create a foreign key from userstbl to clientstbl.

now clients will have multiple products but be assigned to the one user, so you would again create a foreign key from clientstbl to productstbl. do i need a foreign key from userstbl to productstbl or is there no need as there is a foreign key from clientstbl to userstbl?

many thanks again

Sign in to reply to this post

Jason ByrnesWebAssist

You would need to create another column to mark it as a conversion. set the default value of the conversion column to 0, when you update the record from a lead to a sale, updater this column to a one as well.



You will only need to have a foreign key relation from the from userstbl to productstbl if the user can be related to different products than the client. If the user is related only to the same products that the client is related, there is no need to relate the user table to the products table.

Sign in to reply to this post

mr hankey

thanks jason so would the conversion column be in the clienttbl?

so:

status - drop down
&
Conversion - 0 or 1

?

many thanks again

Sign in to reply to this post

Jason ByrnesWebAssist

It would be in the same table that contains the status column.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...