close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Problems inserting via mysqli to db

Thread began 4/23/2017 9:29 pm by dionysus224892 | Last modified 4/24/2017 4:12 pm by Ray Borduin | 1373 views | 6 replies |

dionysus224892

Problems inserting via mysqli to db

I have a big form that needs submitting. There are 2 parts to this question.

1. How can I add the equivalent of this --- or die(mysqli_error($db)) --- to the execute method used with the webassist code in order to display errors with running the query?

2. Some of my fields begin with a number, seeing as there are various sections with the same questions, so for example :
2-income-order
2-income-comments
etc.

Is this a problem with mysql tables?

Thanks very much,
George

Sign in to reply to this post

Ray BorduinWebAssist

1) Update debug to true in the rsobj.php file.
2) Yes this can be an issue. You can fix it by wrapping the column names with ` (the key to the left of the 1) like: `2-income-order`

The dashes would cause issues even without the numbers.

Sign in to reply to this post
Did this help? Tips are appreciated...

dionysus224892

Thanks for the reply... debug seems to be already set to true?
$this->Debug = true;

Also.. where would I enter in the ` ? As in the following ?

$InsertQuery->bindColumn("`1a-knowledge`", "s", "".((isset($_POST["1a-knowledge"]))?$_POST["1a-knowledge"]:"") ."", "WA_DEFAULT");

UPDATE : OK .. just tried this and nothing happened.

Sign in to reply to this post

dionysus224892

This is the trigger :

if ((((isset($_POST[""]))?$_POST[""]:"") != "")) {

I want it to submit and enter.... is this correct?

Sign in to reply to this post

Ray BorduinWebAssist

You would want to enter the name attribute of one of your form fields to check for. It can be any one of them if you want it to capture any submit from the return key lie:

if ((((isset($_POST["FieldName"]))?$_POST["FieldName"]:"") != "")) {

Sign in to reply to this post
Did this help? Tips are appreciated...

Ray BorduinWebAssist

The quotes are in the correct place in your example.

Sign in to reply to this post
Did this help? Tips are appreciated...

dionysus224892

Thanks very much!

Sign in to reply to this post

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