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

MRT- Not inserting or updating Check Boxes

Thread began 2/24/2015 10:43 am by Jon Cunningham | Last modified 2/24/2015 1:20 pm by Jason Byrnes | 506 views | 12 replies |

Jon CunninghamBeta Tester

MRT- Not inserting or updating Check Boxes

Hi Guys

I always seem to get issues when using MRT. As always I follow the MRT Tutorial to the letter http://www.webassist.com/tutorials/Manage-relational-tables.

After a bumpy start to find out that DW CC and Yosemite has a memory leak I have now installed win 7 and Dreamweaver CS6 using Bootcamp. All good!

Now my problem.

Following the tutorial (Done this a few times today) I have now tested the completed pages only to find that neither the insert or the update pages actually insert or pull information from the database.

I have attached the created pages and a copy of my DB to this post with the hope that Jason may look at the generate code.

Reference:

Windows 7
Dreamweaver CS6
Latest Extensions installed

Kind regards

Jonathon

Attached Files
venture.zip
Sign in to reply to this post

Jason ByrnesWebAssist

lets get the insert working properly first.

on the insert page, i see a couple problems:

1) the options checkbox has the value set to use the OptionsId column:
<input name="options_<?php echo $RepeatSelectionCounter_1; ?>" type="checkbox" value="<?php echo $row_rsOptions ['OptionsId']; ?> ">


in your table, this column is named with an upper case D in ID, some MySQL servers are case sensitive, change that to use the proper case:
<input name="options_<?php echo $RepeatSelectionCounter_1; ?>" type="checkbox" value="<?php echo $row_rsOptions ['OptionsID']; ?> ">

2) in the multiple record insert behavior, the vehicleOptionsOptionID column is not properly bound. edit the multi insert behavior an bind the vehicleOptionsOptionID column to the repeated Filed: options. do this by clicking the drop down arrow in the value settings and selecting options.

Sign in to reply to this post

Jon CunninghamBeta Tester

I have done what you have suggested and i am now getting Column 'vehicleOptionsOptionID' cannot be null.

Attached page so you can see my changes.

Jonathon

Attached Files
vehicle_insert.zip
Sign in to reply to this post

Jon CunninghamBeta Tester

Jason, I think i have sorted the can not be null issue.

Changed

<span style="width:200px;float:left;"><input type="hidden" name="options_mihidden_<?php echo $RepeatSelectionCounter_1; ?>" id="options_mihidden_<?php echo $RepeatSelectionCounter_1; ?>" value="1" />

to

<input type="hidden" name="options_<?php echo $RepeatSelectionCounter_1; ?>" id="options_<?php echo $RepeatSelectionCounter_1; ?>" value="1" />

is this right as the can not be null error has now gone

Jonathon

Attached Files
vehicle_insert.zip
Sign in to reply to this post

Jon CunninghamBeta Tester

Not sorted..

Attached Files
vehicle_insert.zip
Sign in to reply to this post

Jason ByrnesWebAssist

in the insert multiple record behavior, you have it set to always insert.

for the Skip if empty option, select the the options checkbox.


also, the options checkbox value has a space at the end.

change:
value="<?php echo $row_rsOptions ['OptionsID']; ?> ">

to:
value="<?php echo $row_rsOptions ['OptionsID']; ?>">

to remove the space.

Sign in to reply to this post

Jon CunninghamBeta Tester

Insert page is now working and writes to database.

Thank you

Just the update page now LOL

Sign in to reply to this post

Jason ByrnesWebAssist

update page just has bad syntax for the check box code.

lines 725 - 728:

<span style="width:200px;float:left;"><input type="hidden" name="WADA_RepeatID_phpechorow_rsOptionsOptionsID_<?php echo $RepeatSelectionCounter_1; ?>" id="WADA_RepeatID_phpechorow_rsOptionsOptionsID_<?php echo $RepeatSelectionCounter_1; ?>" value="<?php echo $row_rsOptions["<?php echo $row_rsOptions ['OptionsID']; ?> "]; ?>" />
<input <?php if (!(strcmp($row_rsOptions ['OptionsID'] ,WA_AB_returnPreSelectValue($WA_PreSelect_RelationalTable_1, $row_rsOptions ['OptionsID'] )))) {echo "checked=\"checked\"";} ?> name="options_<?php echo $RepeatSelectionCounter_1; ?>" type="checkbox" value="<?php echo $row_rsOptions ['OptionsID']; ?> ">
<?php echo $row_rsOptions ['OptionsName']; ?>
</span>




should be :

<span style="width:200px;float:left;"><input type="hidden" name="WADA_RepeatID_phpechorow_rsOptionsOptionsID_<?php echo $RepeatSelectionCounter_1; ?>" id="WADA_RepeatID_phpechorow_rsOptionsOptionsID_<?php echo $RepeatSelectionCounter_1; ?>" value="<?php echo $row_rsOptions['OptionsID']; ?>" />
<input <?php if (!(strcmp($row_rsOptions['OptionsID'] ,WA_AB_returnPreSelectValue($WA_PreSelect_RelationalTable_1, $row_rsOptions['OptionsID'])))) {echo "checked=\"checked\"";} ?> name="options_<?php echo $RepeatSelectionCounter_1; ?>" type="checkbox" value="<?php echo $row_rsOptions['OptionsID']; ?>">
<?php echo $row_rsOption['OptionsName']; ?>
</span>
Sign in to reply to this post

Jon CunninghamBeta Tester

Hi Jason That did not work. Sorry

Sign in to reply to this post

Jason ByrnesWebAssist

works on my end.


I'll need to troubleshoot directly, see the private message section.

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...