Jump to content

CPGAmy

New Members
  • Posts

    8
  • Joined

  • Last visited

CPGAmy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. See, your explaination makes so much more sense. Now I can see the difference between numerical array and associative array, which I now can understand why my code wasn't working in the way I expected it to. The examples provided really showed what associative and numerical arrays were. The manual is obviously written for folks who already have a lot of the knowledge and training and that the manual seems to be more in the direction of a "reminder" reference. I would not have gotten the information from the manual at all that Psycho laid out. Repeating terms that I don't know what they mean, after I stated I didn't know what they were, in attempt to explain things does not make it any clearer or easier to understand. I wish there was some formal class locally I could go to (and don't cost thousands of dollars) because just to be able to read the texts that are available on PHP, it is obvious you need a lot of background training in terminology and other basics before you can even understand what is being said. Touching on that type of subject seems to be in less supply than the other texts far as online searches go (versus HTML which seems to have a lot of texts written in laymans terms). It is certainly important and this discussion has definitely shown me there is a lot of background knowledge that should have been picked up along the way of me making it to where I am now. A lot of folks who come to these forums looking for help don't have the knowledge that you folks do. It would seem you have forgotten what it was like to see PHP terms for the first time ever. If dealing with newbies to programming is so frustrating for you that you come to a newcomer to the forums with complaints about newbie-programmers, maybe you should reconsider spending your time in helping newbies. Maybe you should save your mentorship for the folks who are more experienced and just not participate with the newbies? Or perhaps all of that is incorrect and I am the ignorant one. Is PHPFreaks forums limited to only the experienced programmers and not the place for novice programmers? Should I be going somewhere else that is more appropriate for my skill level?
  2. "Working on other pages" as in other php files I made use mysql_fetch_row() and they give me results. Would it help if I gave an example? I know I'm terrible at explaining things.
  3. Very interesting! So what exactly is mysql_fetch_assoc doing that mysql_fetch_row isn't? I tried to read their pages on php.net but that website is pretty frustrating and I can't understand what they are saying when they discuss these functions (their text may as well be written in Greek). Only thing I could grasp from the website is that it is deprecated (mysql_fetch_row is as well). I have used mysql_fetch_row for years and it has given me the results that I was looking for and it is working in other pages related to this project. Does it just not "get" JOIN whereas mysql_fetch_assoc does? Or is it something else?
  4. I'm sensing some tension that is starting to warm up here...So let me go ahead and explain something I probably should have cuz I really don't want folks to get the wrong impression and to get mad at me because of a simple misunderstanding. I have 0 understanding of what's going on so there needs to be some patience with me, guys. I am a novice at best, which I probably should have stated in my initial post to help everyone see where I am in the PHP/MYSQL world. So I apologize for not letting you know sooner - that might have helped. @gizmola: This shows up when I replace that section of code with your code: array(4) { ["site"]=> string(1) "3" ["service"]=> string(1) "2" ["t1m3"]=> string(7) "4 hours" ["id"]=> string(1) "2" } Circling back to my above statement, I have 0 understanding of what is going on here and am a novice. Should this be outputting just one entry? I have three [test] entries in that table that the [initial project] code was expected to show.
  5. The errors do come up when I screw up in other areas. For example, when I initially wrote the code in the beginning stages, instead of saying FROM I had accidentally wrote ROM. The page did its job and pitched a fit about it and when I corrected it, no more error message. So my error messages have been turned on and weren't being suppressed. Just thought I would throw that out there since it was brought up; nobody is psychic to be able to know my settings. I tried mysql_fetch_assoc and that made no difference. If I am understanding the mysqli_ direction, I changed all my queries to using mysqli_ instead of mysql_ and I am getting error messages. I switched them back to mysql_ and the error message are gone.
  6. In case it was missed, I did the query and it gives me result there.
  7. I have no idea how to do that - how do I test that out in phpmyadmin? EDIT Dumb question! I found it. =P It gives me result there and are the results I'm looking for.
  8. This is my first time working with JOIN. First let me display the code: $queryimg2 = "SELECT `serv_dur4`.`site`, `serv_dur4`.`service`, `serv_dur4`.`t1m3`, `site_n4m3`.`id`, `serv_typ3`.`id` FROM `serv_dur4` INNER JOIN `site_n4m3` ON (`serv_dur4`.`site`=`site_n4m3`.`id`) INNER JOIN `serv_typ3` ON (`serv_dur4`.`service`=`serv_typ3`.`id`) ORDER BY `serv_typ3`.`nam3` ASC"; $resultimg2 = mysql_query($queryimg2)or die( mysql_error() . "<HR>".$queryimg2); while($img2 = mysql_fetch_row($resultimg2)){ // $hours = $img2['serv_dur4.t1m3']; echo "<tr><td><td>" . $img2['serv_dur4.t1m3'] . ""; } I have been spending hours today on Google researching the crap out of this thing and can't seem to get it working. I'm wanting this to output a matrix / table. This table is meant to be a matrix to show how long a service typically takes to do depending on the job site and the type of service that is being done there. The best way I could pull this off was using JOIN (or in my specific case, INNER JOIN) to spit out rows of the results. But I have been running into massive bumps along the way. My initial dream was this to look like a real table with the job sites lining up along the top horizontal row (pardon, I can't remember which is the X/Y axis) and the types of services line up on the far left vertical row with all of the cells filled with the time durations. I couldn't get that to work so now I'm working on having the results just spit out in a long vertical line. If there is some way to make it happen the way my original plan was, please do let me know. Anyways, I have been fighting with this using every single trick Google has shown me (again, spending hours and hours searching, reading forums, reading tutorials, reading discussions, etc) but there doesn't seem to be a single case that matches mine for some reason. The problem is the coding is not outputting anything, not even error messages. I've tried various ways to set up the SQL code, nothing changed. I tried various ways to get PHP to display the results, nothing changed. I'm using XAMPP on my local drive, if that has anything to do with it (I tried Googling if XAMPP has JOIN turned off [i know with email functions it does have that off] but couldn't find anything about that either). Any clue as to what will get this thing to pump out the results?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.