Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Yes. In fact, it's called..... JOIN. (imagine he's holding up a sign that says mysql.)
  2. Dan you can close it, I don't care :-P
  3. You'll still need to do an if() after the foreach to make sure you don't output the cell for the ID. This is a logic problem. If you can state it in english how it should work, you can then write the code.
  4. With 152 posts, you should know by now HOW to ask for help on this forum. What have you done, where are you stuck, etc etc.
  5. I think the fact that you can't echo a simple string for debugging is the biggest problem.
  6. Chuck Norris is the only known person to have successfully divided by zero. I don't always do division, but when I do, I always divide by 0.
  7. If you want the ID, you need to select it. If you don't want it output in your table, don't output it! You'll have to add something after foreach($row as $cell) to check which cell you are outputting before doing it. You will likely want to change it to foreach($row as $key=>$cell)
  8. In Soviet Russia, 0 divides YOUUUUUU
  9. No, YOU didn't. She posted that code. YOU posted an error. There are plenty of people who post on here who would read her post, change the code, and say it didn't work. There's no logical reason for that code to cause that error, explode CANNOT return a string. It can return a BOOLEAN or an array. Therefore, the REST of your code matters too. I'm certainly able, but if you're not able to learn how to GET help, you won't get it. Don't worry, I won't bother trying to help you anymore.
  10. What??? Post the structure of your table and explain what you want to echo on your page.
  11. You need to POST your code when you make changes, and post WHAT you tried.
  12. 1. Put your query in a variable and echo it so we can see it. 2. Does the query work if you run it directly in mysql/phpmyadmin? 3. Did you store the zipcodes as int or varchar?
  13. Why are you doing two queries? You need to turn on error reporting because it would show you a ton of notices and errors. Your HTML table is also going to be way messed up, you have only one <tr> and you put the </tr> inside the loop.
  14. You have to do it on each item, or use array_filter as premiso said.
  15. Did you read the manual? http://php.net/manual/en/mysqli.real-escape-string.php
  16. $documents = ""; Is not an array, you can't use foreach on it.
  17. Don't run queries inside of loops. You'll need to use a JOIN
  18. Dan, don't you know there are 3 quirklocks in a day? Sheesh. This is basic stuff, why can't PHP do it magically?
×
×
  • 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.