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

rating

My insert behavior is not inserting

Thread began 3/03/2021 7:56 pm by NavyChief | Last modified 3/26/2021 7:24 am by Nickmiller | 227 views | 17 replies |

NavyChief

My insert behavior is not inserting

I created an insert page that does not seem to be inserting. I had to manually alter the code because of conditions I have as a very complicated set of pages.

Please review the attached php page and if you can tell me two things: (1) how come it is not inserting? and (2) can you tell me how to check if insertion took place (I need to set the $isgood value based on if the insertion took place).

Attached Files
rsvp_entry.php
Sign in to reply to this post

Ray BorduinWebAssist

You can get rid of this code:
$wa_startindex = 0;
while(!$rsADHOC1->atEnd()) {
$wa_startindex = $rsADHOC1->Index;
$rsADHOC1->moveNext();
$totalRows += 1;
}
$rsADHOC1->moveFirst(); //return RS to first record
unset($wa_startindex);

and just use:
$rsADHOC1->TotalRows;

It looks like it should insert.

You can check if an insert took place with:
$isgood = ($InsertQuery->InsertID!=0);

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

NavyChief

That did not work.....

IT still did not insert even with the changes. I made the changes you stated and it still will not insert.

I am baffled.... I read somewhere there is a debug code you can add to see what the SQL response / Errors are... what is it and where should I add that?

Attached Files
rsvp_entry.php
Sign in to reply to this post

Ray BorduinWebAssist

It should be:

if ($rsADHOC1->TotalRows == 0) {

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

NavyChief

Sadly it still will not insert....

does anyone know the debug commands I can add to see what MySQL is returning??

Attached Files
rsvp_entry.php
Sign in to reply to this post

Ray BorduinWebAssist

You can usually use die() and var_dump() statements to debug just about anything in php.

If it doesn't work, does it redirect to the rsvp.php page? Are there any errors?

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

NavyChief

Still will not insert....

I added a bunch of debug commands into the page I am sending and a screen capture of the results.

Attached Files
rsvp_entry.php
Sign in to reply to this post

Ray BorduinWebAssist

I'd need to debug this with you in a premier support ticket. It is too complex to just look at and figure out without having my hands in the code.

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

NavyChief

I prefer to hear from any other people that might have seen this before I pay for a premier ticket for a non professional site (read no budget for premier tickets).

Does anyone else see why this code is not inserting???

Sign in to reply to this post

Ray BorduinWebAssist

Create a simplified page that demonstrates the issue without hand coding and I may be able to help more. Attach the page in your reply..

My guess is that maybe you aren't setting a value of a field that doesn't allow null, so the insert fails?

Sign in to reply to this post
Did this help? Tips are appreciated...
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...