close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Insert field problem

Thread began 11/30/2012 2:39 pm by john70964 | Last modified 12/04/2012 3:34 pm by john70964 | 793 views | 10 replies |

john70964

Insert field problem

Hello
I am trying to get a dropdown field called Beam_Measure to insert into a table but so far have not been able to. Other similar fields work OK

As soon as I insert a value into the insert data options I get a red exclamation mark against the Insert Record SB.

If I use the form, the entry in that field never reaches the database table.

I deleted and re entered the field but still had the same problem.
I wondered if anyone can see where I am going wrong.
I am attaching the page and an image

Many thanks for any help.

Regards

John

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

Jason ByrnesWebAssist

In the file you have sent the Beam Measure DropDown list does not have any options to it?

Nor has it been bound in the insert behavior?

I would need to see the file where you have bound it to the insert behavior an added options to the list in order to tell why it may not be working.

Sign in to reply to this post

john70964

Thanks for the quick answer Jason
I am attaching another file.

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

Jason ByrnesWebAssist

to help troubleshoot, change line 163 - 164:

php:
$WA_Sql = "INSERT INTO `" . $WA_table . "` (" . $insertParamsObj->WA_tableValues . ") VALUES (" . $insertParamsObj->WA_dbValues . ")";

  $MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());



to:

php:
$WA_Sql = "INSERT INTO `" . $WA_table . "` (" . $insertParamsObj->WA_tableValues . ") VALUES (" . $insertParamsObj->WA_dbValues . ")";

  echo($WA_Sql);
  $MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error()."|".$WA_Sql);



and post back the result

Sign in to reply to this post

john70964

That seems to have worked and the field content has been inserted into the table.

Thank you so much for sorting out that problem Jason. Is there anything I should look out for in future so as not to cause that to happen?

Regards

John

Sign in to reply to this post

Jason ByrnesWebAssist

that shouldn't have fixed the problem, only written the sql to the screen for troubleshooting that is what the line:

echo($WA_Sql);


should have don, if it is now woking, i suspect the changes weren't properly uploading to the server behavior, you should remove the echo statement from the page to prevent the SQL from being written to the page.

Sign in to reply to this post

john70964

Thank you Jason,
I commented out the echo($WA_Sql); and tested the page and it updates the table OK.

I have one more problem with the page and that is with the selection of the currency field str_currency. In the DB table the field is a varchar length 50

At the moment the field is inserted with a 0 (zero)

I think I have the settings correct and cannot see why a zero should be entered in place of a string.
Can you see what may be incorrect please?

Sign in to reply to this post

Jason ByrnesWebAssist

In the insert record behavior, the price column is set to use the numeric data Type.

Edit the insert record behavior and change the data type for the Price column to text.

Sign in to reply to this post

john70964

Thanks Jason
The field that is showing the incorrect information is the str_currency field.

The price is inserted correctly as a number field.

The str_currency field in the db table is a varchar field but always 0 is entered when the form is used.

Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

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