Jump to content

kts

Members
  • Posts

    221
  • Joined

  • Last visited

Everything posted by kts

  1. Hey, What kind of information are you storing? I'm assuming that none of it is secure financial data. If so could you provide a list of data you need to store and a bit of a description on what this application would need to do. Feel free to PM me. Thanks, Kyle
  2. Your original code worked for me pasting in js fiddle.. so not sure the question. Rather than generate the input as an append for the body, it makes more sense to put this in a div that you are showing and hiding. You can set the div to hidden on default. You can see the changes here: http://jsfiddle.net/uGPJ5/
  3. Make sure all of your seeing all of your errors, it could be something else causing this.
  4. If you look you will realize you only labeled out all information for 2 items.. You mislabeled the numbers for the rest of these pieces.. See bold below. $output[] = '<input type="hidden" name="item_number_3" value="3">'; $output[] = '<input type="hidden" name="item_name_2" value="'.$product.'">'; $output[] = '<input type="hidden" name="amount_2" value="'.$trade.'">'; $output[] = '<input type="hidden" name="item_number_4" value="4">'; $output[] = '<input type="hidden" name="item_name_2" value="'.$product.'">'; $output[] = '<input type="hidden" name="amount_2" value="'.$trade.'">'; $output[] = '<input type="hidden" name="item_number_3" value="5">'; $output[] = '<input type="hidden" name=item_name_2" value="'.$product.'">'; $output[] = '<input type="hidden" name="amount_2" value="'.$trade.'">'; $output[] = '<input type="hidden" name="item_number_4" value="6">'; $output[] = '<input type="hidden" name="item_name_2" value="'.$product.'">'; $output[] = '<input type="hidden" name="amount_2" value="'.$trade.'">'; $output[] = '<input type="hidden" name="item_number_3" value="7">'; $output[] = '<input type="hidden" name="item_name_2" value="'.$product.'">'; $output[] = '<input type="hidden" name="amount_2" value="'.$trade.'">';
  5. The table of students has already been consolidated... when I try to LEFT JOIN ON c.Title = oc.Title I'm not getting all 12 of the rows for each student like I should be...
  6. I have two tables. OTRegents just has 12 rows one for each "Title" FullCredits has all of the results by studentid for any completed Title's with Mark. I am trying to display All Title's regardless if they exist in FullCredits and have them show up null if they do not exist,but still have them display so that each StudentID has 12 rows regardless. When I use this query: SELECT c.StudentID, oc.Department, oc.Title, (case when oc.Title = c.Title then c.Mark else 0 end) Mark, (case when c.Grade >= oc.Grade then 1 else 0 end) Required, (case when c.Grade >= oc.Grade AND c.Mark >= oc.OnTrack then 1 else 0 end) Passed FROM FullCredits c JOIN OTRegents oc ON (oc.Title = c.Title) WHERE c.Type = 'Regents' GROUP BY c.StudentID, oc.Department, oc.Title I am receiving the proper mark's for each test, but the problem is not all of the tests are showing. I need it show all 12 tests for each StudentID When i Remove the FROM FullCredits c JOIN OTRegents oc ON ---> remove the join on (oc.Title = c.Title) I get all of the tests, but the mark will only show correctly for ONE test. I am simply trying to have all 12 rows in the OTRegents be shown for each StudentID and show Mark for each one, if there is no row existing for the Title/Mark for that StudentID I need it to still show up, but for it to be null. Hopefully this makes sense, its clearly a joining issue, but I have been trying many ways and running out of ideas.
  7. Yea, I was just getting desperate... The issue still arises, its strange.. they all seem random highest is 192 and just scatters down randomly no rhyme or reason... New query: SELECT q.StudentID StudentID, q.LastName LastName, q.FirstName FirstName, q.Grade Grade, q.Department Department, sum(crp.RegentPass) FROM CredDetails q JOIN CountRegentsPassed crp ON (crp.StudentID = q.StudentID AND crp.Department = q.Department) GROUP BY q.Department, q.StudentID
  8. Good point, let me clarify a bit. For each student I have 0 and 1's for the RegentPass value. There are about 20 or so per StudentID. Although when using the sum() in this manner, I am getting 74 and 138, 384 for the value of sum(crp.RegentPass) not sure why, but it seems to be summing incorrectly... its not consistent though.
  9. hey, i am trying to sum a bunch of values that are 1's but when it is summed it, it seems to be summing more than just the "Department" and "StudentID" like the where clause states... I'm getting sums of over 100, not sure why ... SELECT q.StudentID StudentID, q.LastName LastName, q.FirstName FirstName, q.Grade Grade, q.Department Department, sum(crp.RegentPass) FROM CredDetails q JOIN CountRegentsPassed crp ON (crp.StudentID = q.StudentID AND crp.Department = q.Department) WHERE crp.StudentID = q.StudentID AND q.Department = crp.Department GROUP BY q.StudentID, q.Department
  10. Hi, In simple, I have two tables. Table One: CreditDetails holds a students information, including mark, department, etc) Second table: OnTrackReq holds the requirements the student must meet. (ontrack, grade, type, taken will be filled to 1 if its required 0 if not) So ultimately, I am looping through each student and comparing their mark (based on department and grade) to the ontrackreq tables which also has grade, ontrack(the number they need to meet) and o.taken i would consider to be passed. o.taken works in the sense of it there is a 1 it is passed. What I forsee the problem is, it will only work if I have the department, grade and type in my where outside the case. Where I need each row to just show me taken if the Department = 'English' and Grade = '11' in OnTrackReq has a 1. Hopefully I explained this properly.. I am just trying to make sure this is possible. SELECT c.StudentID StudentID,c.LastName, c.FirstName, c.Grade Grade, c.Title, c.Department, c.Mark, (case when c.Grade = o.Grade AND c.Mark > o.Ontrack AND c.Department = o.Department AND c.Type = o.Type then o.taken end) as Passed FROM CreditDetails c JOIN OnTrackReq o ON (c.Grade = o.Grade AND c.Type = o.Type) WHERE c.Type = 'Regents' AND c.Grade = '12' GROUP BY c.StudentID, c.Department, c.Type ORDER BY c.LastName ASC Thanks, K
  11. If I'm querying the following through an API returning XML.. SELECT Count(DISTINCT StudentID) FROM Credits WHERE Type = 'Credits' AND Mark > 65 AND Mark < 85 is there a way to also return the number Mark > 85 in the same query Seperately*!?
  12. Hey Jiin thanks the first link seems to be the way I need to go! But I am receiving an error with: Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 1: parser error : Start tag expected, '<' not found in I have seen it in many ways of attempting this... I believe its due to the format of the XML... Not sure
  13. So I have a dataset that is coming back in the version of XML (although not sure if its older, or just not the standard format) it looks like this: <result> <rows> <row> <column name="osis number">209959568</column> <column name="Last Name">Lee</column> </row> <row> <column name="osis number">264978495</column> <column name="Last Name">Stover</column> </row> <row> <column name="osis number">267274983</column> <column name="Last Name">Cruz</column> </row> <row> <column name="osis number">215475278</column> <column name="Last Name">Henderson</column> </row> <row> <column name="osis number">265384750</column> <column name="Last Name">Christian</column> </row> <row> <column name="osis number">267445849</column> <column name="Last Name">Montes</column> </row> <row> <column name="osis number">267545127</column> <column name="Last Name">Jordan</column> </row> <row> <column name="osis number">214962268</column> <column name="Last Name">Lane</column> </row> <row> <column name="osis number">265608117</column> <column name="Last Name">Rice</column> </row> <row> <column name="osis number">204897672</column> <column name="Last Name">French</column> </row> </rows> </result> I am trying to use existing functions like xml2array, although you can see my XML isn't in standard format of <osis number>204897..etc</osis number> Has anyone had to parse XML that looks like this? Also, is it coming out this way because of the spaces in the names? or is just an older style? Thanks
  14. Thank you much! Forgot about show... ugh thanks much.
  15. I thought I had pasted both in sorry... Still: INSERT INTO lct (show, img) VALUES (208, 'clt-nlns-logo.jpg'); You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'show, img) VALUES (208, 'clt-nlns-logo.jpg')' at line 1 It is making no sense to me what soever
  16. Same issue occurs... INSERT INTO lct (show, img) VALUES ('209', 'ba-nlns-logo.jpg'); You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'show, img) VALUES ('209', 'ba-nlns-logo.jpg')' at line 1 Could it be something set on the table? I mean I've NEVER had this much of an issue... it has to be something stupid.
  17. Hey guys, It's been a while since I've php'd and MySQL'd but this should definitely be working... Not sure at all whats causing this problem.. Possibly a mysql table setting? $sql = "INSERT INTO lct (id, show, img) VALUES (NULL, '209', 'ba-nlns-logo.jpg');" You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'show, img) VALUES (NULL, '209', 'ba-nlns-logo.jpg')' at line 1 Table structure is just id INT(30) primary key, show INT(30), img TEXT Even when I Insert via phpMyAdmin and then do create php code for it, paste it into SQL for phpMyAdmin I get the same error! It's crazy? Thanks.
  18. Are you running this off a local machine that you are testing it on?
  19. Thanks Dennis, just got the solution as well! haha, oh well. Cheers
  20. Hey, I am having a bit of trouble making my specific divs show per select choice... onchange="document.getElementById(value).style.display = 'block'; doesn't seem to work... any other suggestions?
  21. Solved. as usual time goes by and you find it. For future reference: return false on the onsubmit will sometimes submit the form, but cancel it out with the false.
  22. To add it also seems to be due to onsubmit="function() return false;"
  23. I am trying to use google map api to validate an address and sometimes the first click of my submit button on the form does not show results, then when submitted again, it does not work properly. How can I ensure it will work the first click?
  24. My mistake, I believe it is the cookie that is the issue. I have a cookie life of 30mins and its working on first load with firefox, but not IE
  25. Ok so this issue is this... I have banners set to change due to session variable. In firefox I load up with a ref id and then close browser, re-open and goto home page. The banner stays the same as it should. In IE I goto home page doing the same process and it shows default, but then when clicking on any link, it instantly recognizes the session for all other pages. Is there a way to solve this? is it just a setting for IE?
×
×
  • 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.