close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Syntax Errors - MySQLi Insert Record + Upload Files - Page won't even load!

Thread began 2/03/2015 6:47 am by Nathon Jones Web Design | Last modified 2/11/2015 10:46 am by Nathon Jones Web Design | 3835 views | 24 replies

Nathon Jones Web Design

Originally Said By: Jason Byrnes
  I understand your frustration, and I will continue looking for a trigger that is causing the issue.  

MySQLi Insert Record doesn't save file names to database. To replicate the error that occurs though try this...

1) Create a MySQLi Insert Record with a file upload field
2) Add the File Manipulation > Upload Files behaviour
3) In the column bindings for the MySQLi Insert Record behaviour bind the file field in your database to the [fielfieldname] Simple File Name option in your Insert form.
4) This inserts something similar to this:
<?php echo((isset($_FILES["filenamefield"]))? preg_replace('/.[^.]*$/', '', $_FILES["filenamefield"]["name"]) :"") ?>
5) OK

You'll end up this either this:
$InsertQuery->bindColumn("filenamefield", "s", "".((isset($_FILES["filenamefield"]))? preg_replace('/.[^.]*$/', '', $_FILES["filenamefield"]["name"]) :"") ."", "filenamefield"]["name"]) :"") ."", "WA_DEFAULT");

Or this:
$InsertQuery->bindColumn("filenamefield", "s", "".$WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"] ."", "filenamefield"]["name"]) :"") ."", "WA_DEFAULT");

With error sometimes...
"It appears that one of your server-side values is improperly coded. Please check this interface for inconsistencies."

So, go back in to the Column Bindings section and this time bind the database field field to the Upload Files (filenamefield) > Server File Name or Upload Files (filenamefield) > Simple Server File Name (neither work).

Upload and you'll find that it doesn't save the file name to database but does upload the file.
Tearing my hair (what's left of it) out here.

Please help.

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





Ease of use


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