Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. I'm telling you, you made the same mistake. Go study the mysql list of reserved keywords.
  2. This is the same problem as before.
  3. Count is a restricted keyword. You can't use it as a column name without using backticks. It's best to change the column name. ALSO: 'count + 1' is literally the string "count + 1". PPS: Don't put numbers in quotes in SQL.
  4. Post the error, as well as the final SQL you generate. It looks like you're missing a comma for your CONCAT_WS but you'd be able to see that if you printed out the actual SQL.
  5. Do you know PHP? If so, What have you tried? If not, I recommend our freelance forum.
  6. "Should I switch to Discourse right now? Probably not." http://www.discourse.org/faq/ Lulz.
  7. I had to do a double take when it wasn't Barand solving this for me. Thank you so much Christian!
  8. That's doesn't make it valid PHP. What "puts" joe into {name}? What program are you using?
  9. If you had error reporting on, you'd see that $price-per-item generates a ton of errors. That's not valid PHP. It's also not what I posted.
  10. This also is in the wrong section. Moving it to PHP code.
  11. After you process the data, save the success message in the SESSION and redirect back to the page. When they press submit it will not resubmit the POSTed data.
  12. For characters use substr. For words, a regular expression.
  13. Your code should look like: //Code that creates $html $price_per_item = $html->find('#price-per-item'); var_dump ($price_per_item); I think your $html object is trying to find another item with that ID which is impossible. I've used that dom parser however and not had that problem. But you need to take this down to the most minimal possible and then add stuff back in.
  14. {name} is not valid PHP. What are you trying to set $name to?
  15. So, using GROUP_CONCAT I can get close with this SQL: SELECT parent.parent_id, GROUP_CONCAT(child.child_id ORDER BY child.child_id ASC) AS child_ids FROM parent INNER JOIN child ON parent.parent_id = child.parent_id GROUP BY parent.parent_id But it won't let me use the GROUP_CONCAT in a where clause so I can compare.
  16. I have two tables which contains one-to-many relationship data. I've simplified this to explain it. Parent Table parent_id parent_name Children Table child_id parent_id child_name I have a php form which submits a list of children ids. I want to write a query which can tell me which parents have exactly these children. So for example I have parent_id:1 and there are two children child_id 1 and 2. If I submit child_id:2, I want no results. If I submit 1 and 2 I want parent:1. If I submit 1, 2,3 I need no results. So far I've got my PHP to generate a query to perform multiple inner joins on parent-child, but that doesn't tell me if I've submitted 1 but I need 1 and 2. It would work for submitting 1,2,3 and only needing 1,2, but it doesn't work for too few children submitted. Example: SELECT parent_id FROM parent INNER JOIN child ON child.parent_id = parent.parent_id AND child.child_id = 1 This will return 1, but I need no rows. SELECT parent_id FROM parent INNER JOIN child ON child.parent_id = parent.parent_id AND child.child_id = 1 INNER JOIN child ON child.parent_id = parent.parent_id AND child.child_id = 2 Will return 1, which is right. Any ideas?
  17. Unless you prove this to be the case, I'm going to agree with Christian. The folder "Fillable" does not exist. If it did you would see one of 3 things when going to it. A directory listing, an index file, or the same message you see at http://www.panceltic.ie/media/. http://www.panceltic.ie/media/Fillable/ does not exist. You have made a naming mistake at some point.
  18. JSON is a notation - not something that can be turned on and off. If the user has Javascript turned off you can't use Javascript. JSON is for Javascript.
  19. Shaving logos into dogs fur? That's disgusting and borderline abuse.
  20. Now you want us to write your papers as well as your php assignments?
  21. Stop wrapping your variables and numbers in strings...
×
×
  • 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.