Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
dmx1

Undefined Index: Description

Recommended Posts

Hi Larry,

When I click the 'Sales Items' link on the home page, I get the following error:

Current Sale Items

An error occurred in script '/Applications/MAMP/htdocs/views/list_sales.html' on line 29:
Undefined index: description
Array

(

    [0] => Array

        (

            [file] => /Applications/MAMP/htdocs/views/list_sales.html

          

 

1) Can you tell me why I am getting this error?

2) Can you tell me how to resolve this error?

 

Thank you

regards

 

 

 

Share this post


Link to post
Share on other sites

You're getting this error because the $row variable doesn't have an element indexed at "description". $row comes from the stored procedure, so either there's likely a flaw in your stored procedure definition.

Share this post


Link to post
Share on other sites

Hi Larry,

I found the error.  Thanks for your response!

 

Also Larry, could you possibly answer my foreign key question in my earlier post because I still don't understand your interpretation of how you made the joins between the foreign key and parent table, without explicitly declaring the connection in your sql script.

 

Thank you!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...