Jump to content

PFMaBiSmAd

Staff Alumni
  • Posts

    16,734
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by PFMaBiSmAd

  1. Pagination needs to build the pagination links with any existing get parameters in the url or without modifying any existing get parameters in the url, depending on your point of view. See the information I posted in the following thread - http://forums.phpfreaks.com/index.php?topic=363172.0
  2. Literal dates in a query are strings and need to be enclosed by single-quotes WHERE event_date > '$date' Without the single-quotes, a date looks like a math subtraction problem: WHERE event_date > 2012-08-08 evaluates to WHERE event_date > 1996
  3. See the logic in the following post on how to 'remember' and detect when a heading value changes and take appropriate action - http://forums.phpfreaks.com/index.php?topic=328053.msg1544137#msg1544137
  4. @Yasoymama, you need to start your own threads for your coding problems so that you can find and track your own threads. I have split your post in this thread into its own thread in this same forum section. Locking this thread...
  5. @scm22ri, you somehow managed to start a new thread in the mysql forum section with what is now reply #5 in this thread. Since that appears to be intended as a reply for this thread, I merged that thread into this thread.
  6. Since the line number where the error is occurring at is in your database connection details, which you edited for the post, I'll guess you were missing a quote or had an extra quote somewhere in the first or second setting.
  7. The event_date column should be a DATE or DATETIME data type. It should NOT be a VARCHAR data type.
  8. ^^^ You do realize that statement contains no useful information upon which to help you. You would need to write or post a picture of the exact symptom or error you got that leads you to believe you cannot get events from the db in order for anyone who is not standing right next to you to have a chance at helping you find the cause of the problem. Also, what debugging steps have you taken to try and pin down exactly why you cannot get events from the db? Are you getting mysql errors? Are you getting any php detected errors? Do you have data in your database table that matches the year and month that you are querying for?
  9. You need to start your own thread for your own programming problem, no matter how close your code might be to someone else's, so that you can find and track your own threads. I have split your posts on this subject into their own thread...
  10. +1 Session variables would result in the least a mount of overall code and the least amount of data being shipped back and forth between the server/browser. You would create arrays of the categories/options per category, stored as session variables, then use those arrays to produce the form and in the validation/display step.
  11. Content that you output on a web page that might contain HTML special characters, needs to be passed through htmlentities, right before outputting it, with the second parameter set to ENT_QUOTES, so that the special HTML characters in the content won't break the HTML on the page.
  12. Did you use mysql_fetch_assoc or mysql_fetch_array? The code posted in this thread was fetch_array and returns both numerical and associative array indexes.
  13. There's nothing in the posted code that has the ability to remove characters from the data and if it was somehow terminating the data field and excluding the characters after the ', those left over bare characters would either generate an sql error or would become part of the following field's data. This symptom is typical of either a form that only submits data up to the first ' character in the data or of display code that only outputs up to the first ' character in the data.
  14. ^^^ Explain what exactly. It's the print_r output from each field in the table from an EXPLAIN/SHOW COLUMNS FROM tbl_name query.
  15. The HTML of your form is being broken by the single-quote and/or you don't have any quotes around a value="..." attribute in your form. What is the code where is this data being submitted from and where you are displaying it after retrieving it from the database table?
  16. Here's something that will probably help with the 'no errors reported' condition. Since you have two database connections, you MUST use the appropriate link identifier in the mysql_error(.....) statements so that you will get errors that were generated on the same link that the mysql_query statement is using. For the same reason you are putting the link identifier into the mysql_query statement, you must put it into the corresponding mysql_error statements. What you are getting now, with no link identifier being used in the mysql_error() statements, is the mysql_error, if any, that occurred on the last link that was opened, which would be the $webspell_db connection.
  17. This topic has been moved to Miscellaneous. http://forums.phpfreaks.com/index.php?topic=363535.0
  18. Not until you actually identify where and what the problem is. So far, you haven't even stated what it is about the date and/or the items being displayed that leads you to believe that they are not correct. Are the date and items wrong or is the date correct, but the items are from the previous day?
  19. Exactly what are you getting (we cannot help with anything unless you show us what exactly it is) and have you confirmed if the rss data at the specific time the problem occurred is correct or not? I'm going to guess that your input data is incorrect, possibly because of the php time zone setting vs the time zone where you and your browser are at.
  20. After you reduce your code and queries as has been suggested, you will be ready for the next step in optimizing this and use JOINed queries to get the data and the displayNames in one single query.
  21. And is your page displaying the way you expect? If so, please mark the thread as solved (the solved button is in the menu at the lower left-hand side of the page.)
  22. People are not going to visit sites/links you put in your post just to see your code or to see what the input data is or what the wrong output is. Post your code in the forum's bbcode tags, post an example of the input data, post the resulting output that corresponds to that data, and identify exactly what is wrong with that output.
  23. @whopunk123, here's a summery of the replies in this thread that you need to review - reply #1 reply #3 reply #5 reply #8 These replies were an attempt to get you to actually look at and think about your code, look at the official php.net documentation showing how to use the mysql_query statement, and to point out specific problems or omissions in your code (i.e. to learn.) Everything after reply #8 either served to derail the thread, was in error, was off topic, or was to point out or undo problems created by the replies. If you are still having problems with your code after following the advice given to you in replies #1, #3, #5, and #8, post your current code, keeping in mind that it should be similar to the Example #2 Valid Query mysql_query code that jesirose linked to in the php.net documentation, along with a statement of any symptoms or errors you are getting when you run your code.
  24. This topic has been moved to PHP Coding Help. http://forums.phpfreaks.com/index.php?topic=363462.0
  25. The markup on the page you posted a link to contains 663 errors - http://validator.w3.org/check?uri=http%3A%2F%2Fwww.airfieldcards.com%2Fvg_temp%2Findex.php&charset=%28detect+automatically%29&doctype=Inline&group=0
×
×
  • 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.