View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

inventory, writing query

Thread began 12/28/2009 6:23 am by watercolor346374 | Last modified 1/27/2010 6:45 pm by watercolor346374 | 3043 views | 21 replies

Eric Mittman

The error is telling you that you cannot have a null value for the inventoryid column in your store order details server behavior that starts on line 178.

In this server behavior you are setting the inventoryid column to the value of the $_SESSION['inventoryid'] variable. This variable is being set to the recordset value for the inventoryID like this:

php:
$_SESSION["inventoryid"] = "".$row_rsInventory['inventoryid']  ."";



Based on the result that you are getting it seems that this recordset is not getting a value for this column. Have you tested the recordset? It seems that there is no filtering occurring on this recordset so you would only ever get the first one in your db.

I think that if you got this recordset setting a value for the session variable it would work for you. To test if you are getting a value from the rs you can add in a die statement during the setting of this variable like this:

code starting on line 71:

php:
if (!session_id()) session_start();

if($_SERVER["REQUEST_METHOD"] == "POST")     {
  $_SESSION["inventoryid"] = "".$row_rsInventory['inventoryid']  ."";
  die("the value of the rsInventory.inventoryid is: " . $row_rsInventory['inventoryid'] . " and the value of the session variable inventoryid is: " . $_SESSION["inventoryid"] . "");
}



This will let you know if the value you are setting this session variable to is present and what the values are after you set the variable. If you see the correct results here the next thing to check would be the value of this session variable when the store order details is occurring. You can add in the same die statement to the top of that server behavior and comment out the one here to see what the values are at that time.

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