Jump to content
Larry Ullman's Book Forums

Melanie

Members
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

2 Neutral

About Melanie

  • Rank
    Newbie
  1. HarleySan- yes, I did just that. I worked through all the normalization steps in the book and saw that the design I had was correct. I'm happy to say tonight that I managed to dynamically return the results I was wanting! It's one long list BUT it's there! I found the key while reading chapter 9- ironically enough Larry had a tip on page 284 that had my name all over it. I realized after staring at the code sample in the book that I was trying to array my results when my function had already done that! I didn't use the function as a function- instead I just pulled out the code from
  2. My initial response is- yes you're right! I struggle with the fact that I seem to be able to create websites that seem complex, and while I can grasp a lot of the concepts I've come across in the book so far, nesting multidimensional arrays eludes me and it is a little irritating. The second part of your comment has made me think- I wonder if an idea that I previously had (but tossed) was the correct one- (sticking with the examples I've been using for continuity) the same two tables, but in the services table, a column that has a field_of_work_id column. It would make the table have more
  3. Ok as suggested, I did some testing. In my database handler file I have the database connection function, as well as these three functions, since I wanted to test this out: getAllRows : supposed to return an array of rows getAllData: supposed to return an array of columns getOneRow: supposed to return an assoc array of values The code: <?php include_once('databasehandlerfile.php'); $conn = new DatabaseConn(); $result = $conn->getAllRows('SELECT * from field'); var_dump($result); ?> Test 1 getAllRows ´╗┐array(18) { [0]=> array(2) { [0]=> strin
  4. Well...I think I have had a sort of lightbulb moment as far as articulating specifically what I want to know within the context of what I am trying to do. In building any company/organization profile, I have the main profile, and that is an array (I believe!) of data: company ID, name, type, etc- one of which is an item (and this is getting into database design so I will keep that brief to try to stay on topic) that could be called "what they do". - Within "what they do", there are two items: the field in which they work, and the services they provide within that field. So what_they_do
  5. I ended up getting it to work- but I think what I seem to be fundamentally confused on is what an array is, and what a multidimensional array is vs a multivariable array. I will have to read up on this more, but I think for now I will continue to work through the book and take notes on what I understand or don't- past experience has shown that these things tend to become more clear as the knowledge base expands. Thank you for the help!
  6. Thank you for the quick response. I would like to create the following: 1. The user can indicate none/some/all choices in a list (letters)- this is a list of all different items. 2. However, in each sub-list (which the checkboxes are set to states, and only show up if an initial indication is made), the list is the same repeating set of options, with multiple allowed. It could be described as thus: Field: -Plumbing -Construction -Electric -Water What do you do within that field? -Management -Support (IT, Admin, etc) -Laborer -Engineering For every item in list
  7. I've read through the book, and now I'm working through it bit by bit; I am so hung up on this one subject that I need to ask for some clarification. In script 2.7 I'm working through arrays, and how to indicate strings, etc. On p. 64 the box on the right says that multi-dimensional arrays can also come from an html form- and since this is what I want to figure out how to create, I thought I would try to write the correct syntax for this to understand it thoroughly. Here's the code- a simple form that has check boxes and then sub check boxes; I realize this might be a bit more compl
×
×
  • Create New...