DMXzone Database Updater PHP Support Product Page

Solved

I can't get a record to insert

Reported 04 Nov 2014 04:07:29
2
have this problem
04 Nov 2014 04:07:29 Matt Penn posted:
I've gone thru the tutorial videos; and the other "can't insert" thread in this forum, but I still can not get the database updater to work for me. I have the action, executor, and the onclick behavior on the form button all setup. But clicking the button does nothing.

When I run my page with the javascript console open, I see a few error messages. (screenshot attached). Can you please take a look at point me in the right direction?

Replies

Replied 04 Nov 2014 09:53:49
04 Nov 2014 09:53:49 Teodor Kuduschiev replied:
Hi Matt,
Could you either upload the page to some live server, where we can access it or send the page to
Replied 05 Nov 2014 04:39:13
05 Nov 2014 04:39:13 Matt Penn replied:
I emailed link to Thanks.
Replied 05 Nov 2014 09:05:14
05 Nov 2014 09:05:14 Teodor Kuduschiev replied:
Hello Matt,
Your source code is a total mess.. no head tags, no html or body tags - just some source code, which is partially missing. -> the databindings js is missing.
Please create a new blank page in your dreamweaver, and recreate your page following the tutorials...
Replied 05 Nov 2014 13:19:32
05 Nov 2014 13:19:32 Matt Penn replied:
I had stripped everything out except DMX code for troubleshooting. Sorry. I just sent you a 2nd link.

At what point in the process is the databindings js suppose to be added? I just recreated everything again from scratch and that code is not being inserted. I'm following step-by-step the instructions in the video tutorial on how to insert a record (www.dmxzone.com/go/22210/insert-records-into-a-database). Thanks
Replied 05 Nov 2014 15:15:57
05 Nov 2014 15:15:57 Teodor Kuduschiev replied:
Well, actually you need to have some dynamic data placed on the page in order for the databindings js file to be included (this is also shown in the beginning of the tutorial "we included a dynamic table .... etc." )
You can just have a list of the database entries below the form, which automatically refreshes on insert and shows the new record that you just added.
Replied 06 Nov 2014 15:28:25
06 Nov 2014 15:28:25 Matt Penn replied:
Teodor worked with me to fix this issue. I appreciate his help. I just wanted to document for anybody else...

1) You must have dynamic data on the page, even if you don't need it. That forces the dmxDataBindings.js script/includes to be inserted. The update function relies on this.

2) But in my case the dmxDataBindings.js was not inserted in the correct order automatically. I had to move it in the code so that it was before the dmxDatabaseAction.js script.

3) PDO has to be enabled in your PHP settings.

Once I applied those three fixes, the updater function worked.
Replied 11 Nov 2014 03:44:44
11 Nov 2014 03:44:44 George Mann replied:
I am unable to insert a record either. Here is the test page:
www.themanndesign.com/comhub2/test.php

Here are the errors from the log:
POST www.themanndesign.com/comhub2/dmxDatabaseActions/InsertNewUser.php 500 (Internal Server Error) jquery-latest.pack.js:4
send jquery-latest.pack.js:4
m.extend.ajax jquery-latest.pack.js:4
f.send dmxDatabaseAction.js:11
f.run dmxDatabaseAction.js:7
dmxDatabaseActionControl test.php:44
onclick test.php:62

Uncaught SyntaxError: Unexpected token r jquery-latest.pack.js:4
m.parseJSON jquery-latest.pack.js:4
h dmxDatabaseAction.js:8
m.isFunction.e jquery-latest.pack.js:2
j jquery-latest.pack.js:2
k.fireWith jquery-latest.pack.js:2
x jquery-latest.pack.js:4
b jquery-latest.pack.js:4
Replied 11 Nov 2014 12:48:06
11 Nov 2014 12:48:06 George Mann replied:
Teodor also solved my problem. The extensions (HTML5 Data Bindings, DMXZone Database Connector, and DMXZone Database Updater) were not adding sqlBuilderEx.php to the ScriptLibrary/dmxDatabaseConnector folder. I searched my hard drive and found the file in a directory for Dreamweaver, copied it to the folder and everything is working great.
Replied 25 Nov 2014 03:55:02
25 Nov 2014 03:55:02 Steven Irwin replied:
Thanks Guys
I had the same problem where I had to move dmxDataBindings.js in the code so that it was before the dmxDatabaseAction.js script.
Replied 02 Dec 2014 15:59:56
02 Dec 2014 15:59:56 Andres Gonzalez Michaca replied:
I had the same problem, and the solution was as George said, the sqlBuilderEx.php was not inserted by the extension, I have to find it and moved to ScriptLibrary and after that works perfect.

Reply to this topic