close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Can I move records from one MySQL table to another?

Thread began 5/02/2016 5:12 pm by gail.bergan407744 | Last modified 6/13/2016 3:19 pm by santius355196 | 664 views | 21 replies |

gail.bergan407744

Can I move records from one MySQL table to another?

Hello,

I have both MySQLi Server Behaviors and DataBridge (w/ DataAssist) so I'm hoping one or the other of these add-ons can do the trick. I have a member database with two tables: a users table made up of active members, and a lapsed_members table made up of those whose membership has lapsed. I'd like an easy way for us, when it becomes obvious that a member is not going to renew, to move their record from the users to the l_m table via the php page. I know how to insert a new member and update a member and have pages for those. But I don't know which behavior to use to delete a record from one table and insert that exact record into another. Then, obviously, if a lapsed member decides to renew, to do the reverse.

In the beginning, these two tables were one giant users table and I only recently split them in two. So the user ids shouldn't be duplicated.

Thanks for any guidance you can give me.

Gail

Sign in to reply to this post

Ray BorduinWebAssist

I think doing this with a custom SQL query is probably the best bet. I could help you with writhing the code in a premier support ticket. Doing it with the supplied server behaviors would over complicate the process.

Sign in to reply to this post

gail.bergan407744

Hi again Ray,

This sounds good to me. In the long run having your hands-on help will be the most efficient. See the PM area for times when I'm available.

Sign in to reply to this post

gail.bergan407744

Ray,

Hi again. In the second part of this support call we discussed plugging in Universal Email into my membership application form. I've altered the send_form_email.php to match the fields in my form that I want sent in the email. I believe I've checked and uploaded everything else, but it's not emailing me the simple name/address info I'm asking for. I'm getting an internal server error: "There is a problem with the resource you are looking for, and it cannot be displayed." As far as I know I have the SMTP and port info entered correctly. Do you think another phone call is in order? Please see PM.

Sign in to reply to this post

Ray BorduinWebAssist

I put you in my calendar for 10am Thursday.

Sign in to reply to this post

gail.bergan407744

Ray,

I've already had someone (or a robot) fill in my apply_renew page with garbage and send out emails. So I need to put some validation and required-field controls in that form. Do I use the Validation behavior under the WebAssist menu? I used to use Spry Validation for this but I understand that's been phased out now. Too bad because I thought that was easy to figure out. When I tried to implement Validation, it asked for a Server Variable and I didn't know what to choose. Can you point me in the right direction? I'll have to do this with the CCinfo page too.

Sign in to reply to this post

Ray BorduinWebAssist

CAPTCHA is probably the best solution to prevent bots. You can add the CAPTCHA field to your form and a field where someone enters the characters displayed. Then do LIKE value comparison from the SESSION variable created by the captcha compared to the form element you place.

The Sever Variable to validate is usually the form element you choose from the bindings. If you do your best to get started and then attach your page to a reply I can comment on what is left or what is wrong.

Sign in to reply to this post

gail.bergan407744

You lost me on the second part - not sure what you mean by "Then do LIKE value comparison from the SESSION variable created by the captcha compared to the form element you place." I opened the Validation dialog box and chose Like Entry for Type, but still didn't know what to choose after that. My file is attached.

Attached Files
apply_renew.php
Sign in to reply to this post

Ray BorduinWebAssist

You would compare the value of:

<?php echo($_SESSION['captcha_Security_Code_1']); ?>
to:
<?php echo($_POST['Security_Code_1']); ?>

It doesn't matter which order... one is the server variable and the other is the compare to value.

Sign in to reply to this post

gail.bergan407744

OK in the field under the Captcha image, I clicked in there and then went to WebAssist > Validation in the SB dialog box; chose Server Validations. Validation Trigger is Current Page Submit. (?) Validation Type is Like Entry. Server Variable is Session > captcha_Security_Code_1. I select that and hit OK. Then I hit the + sign, which opens up Same As: online_membership [the form name] > Security_Code_1. Hit OK again to close the dialog box. Saved and uploaded. When I try to open the page I get this error:


Parse error: syntax error, unexpected '<' in C:\Data\Websites\GCSSEPM\membership\apply_renew.php on line 11.

The file is attached. Please let me know what I've done wrong.

Attached Files
apply_renew.php
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...