Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
I'm telling you, you made the same mistake. Go study the mysql list of reserved keywords.
-
This is the same problem as before.
-
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.
-
AJAX!
-
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.
-
AJAX!
-
Do you know PHP? If so, What have you tried? If not, I recommend our freelance forum.
-
"Should I switch to Discourse right now? Probably not." http://www.discourse.org/faq/ Lulz.
-
I had to do a double take when it wasn't Barand solving this for me. Thank you so much Christian!
-
That's doesn't make it valid PHP. What "puts" joe into {name}? What program are you using?
-
How to convert number in String to Value, then calculate Markup?
Jessica replied to mahogan's topic in PHP Coding Help
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. -
This also is in the wrong section. Moving it to PHP code.
-
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.
-
For characters use substr. For words, a regular expression.
-
How to convert number in String to Value, then calculate Markup?
Jessica replied to mahogan's topic in PHP Coding Help
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. -
{name} is not valid PHP. What are you trying to set $name to?
-
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.
-
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?
-
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.
-
Did you read the manual?
-
You have too many " in there.
-
Your Predictions for the Future of the Advertising Industry?
Jessica replied to justlukeyou's topic in Miscellaneous
Shaving logos into dogs fur? That's disgusting and borderline abuse. -
Your Predictions for the Future of the Advertising Industry?
Jessica replied to justlukeyou's topic in Miscellaneous
Now you want us to write your papers as well as your php assignments? -
How to convert number in String to Value, then calculate Markup?
Jessica replied to mahogan's topic in PHP Coding Help
Stop wrapping your variables and numbers in strings...