Jump to content

ManiacDan

Staff Alumni
  • Posts

    2,604
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by ManiacDan

  1. The ID of a row is metadata, not actual data. It's supposed to be used to identify a row 3 seconds later when a user clicks "update." It's not supposed to be used to determine the long-term identity of a piece of data. Back in the day when Fenway and I learned databases, especially MySQL, the ID of a row could actually CHANGE at random. If you had all your foreign keys set up properly and your code was correct, it wouldn't affect you, but if you thought that User ID 3 was always you, and that User ID 47 was created after User ID 45, you were in for some surprises. It's not that big of a deal anymore, of course, because database tech has matured, but it's still not good to rely on an auto-number column for absolute long term identity. The only thing that identifies the data accurately is the data itself. The auto-numbered keys are for ease of access for your application that sits on top of a database (and in some instances for foreign keys). Apologies to fenway if I made you feel old.
  2. Looks like the data is already corrupt when you pull it from the source. Check the source in your browser, is it screwed up there? (What I mean is: Go to the XML feed in your browser without involving your code at all)
  3. Ok, are you saying that you're trying to FETCH an RSS feed and output portions of that RSS feed as HTML? because you're not printing RSS, you're printing HTML. that being said, see all those places you get information from your SimpleXMLObject elements? $item->description? Put htmlentities around that.
  4. The political discussion that had started in this thread is now split into its own thread. Please use this thread to discuss domain registrars and web hosts only.
  5. You still have not described a problem relating to RSS feeds. Explain it the same way.
  6. Ok so the question has nothing to do with RSS feeds or inserts then? Can't you see how we might be confused? You would, as I said in the very first post, wrap htmlentities() around $french: echo htmlentities($french); Done.
  7. A fox news reader!? GET HIM!
  8. GoDaddy supported SOPA, so a bunch of people transferred away from them (including big names like Wikipedia and Penny-Arcade). GoDaddy was interviewed about the mass exodus and said something to the effect of "we're seeing a lot of noise, but it hasn't hurt us financially at all." The hivemind decided to make an example out of them.
  9. Except strftime doesn't exist in the code you gave. Again: Describe the problem. In English. "I get an RSS feed from someSite.com and run their timestamp through strftime but the output is garbled." <-- that is a problem description.
  10. I don't know if you're being serious or not, but it IS international dump godaddy day. I never had domains with them in the first place. "Titties 'n Nascar" is not an advertising campaign that appealed to me.
  11. Seriously, mysql_error(). Print it, or use the code mikosiko provided to get it. something is wrong with your syntax, field names, or table names. NOTHING is wrong with the IN clause you were given. The correct syntax for that is: WHERE fieldName IN (2,3,4); That is correct. That is what you supposedly have. The problem is that MySQL is complaining about other problems somewhere else, like the fact that you keep changing your capitalization or you've misspelled the tablename or something. Show us the error and we'll have a better shot at figuring out which mistake it is.
  12. Time to check the mysql errors.
  13. Reddit has been researching this for you.
  14. That looks right. The code kicken gave you follows the same pattern, though you may have dropped a quote or something somewhere.
  15. One of us isn't understanding here... You have: -> LEFT JOIN favourites AS alias2 ON race_results. position_fav_2 = alias2.fav That implies that favourites.fav is the same as race_results.position_fav_2. But you try to DISPLAY favourites.fav. So just drop your joins entirely and display race_results.position_fav_2. See? Your query doesn't need the joins or this other table AT ALL. Unless you're trying to do something else that you haven't mentioned.
  16. Ok, back up. You're right, I'm not understanding, because now you've described four entirely separate methods of displaying. What is the exact problem? Where do you get the data from? How do you display it? When does the error appear? Do not tell me about echoing random things which may or may not work, do not tell me about setting locales, tell me the problem.
  17. The easiest solution is to simply do: if(preg_match("/" . preg_quote($products_image_base) . "/i", $file) == 1) { Explaining WHY would take too long, and you're not a coder anyway. -Dan
  18. you could do it yourself by rebuilding the indexes on the table (though it's very unlikely). I just think if you want to do date queries, you should be using a date.
  19. You don't need to join these tables at ALL if you already have all the values of favourites.fav in the race_results table.
  20. Learn to think for yourself and the world will be a lot easier for you. I didn't tell you to execute the query just like nobody tells you to lift the toilet seat before you pee. If I was on a power trip I'd ban you or something, but I don't care. I wanted to help, and in fact gave you the framework you needed to get started. You didn't fully implement the framework that I gave you and you didn't take it to its logical conclusion: executing the query. Any version of "you didn't actually execute the query" would have sounded sarcastic. Also, identifying yourself as "not a programmer" here on this professional programmer forum might change the quality of the answers you get. Like I said earlier, I assumed you had a certain level of skill when I gave you the outline of the changes to your application. All I know is your name. I automatically assign you an average level of skill unless told otherwise. As for your actual problem: If you've made the changes kicken suggested to your query, and you've added the actual query() function, it should be working. If it's still not working: 1) Echo the query itself, copy and paste it here and we'll look at it. 2) echo mysql_error() after the query is run and you can see the actual MySQL error, which you can use to debug on your own if you know enough SQL. Otherwise, we'll look. When you say print_r gave you that output, you mean print_r($_POST['close']), right?
  21. If your definition of "after" is "chronological" then you should have an insertDate field on this table so you can do it right. IDs can be re-numbered or switched.
  22. Actually I was just wrong. Kicken noticed that I gave you the solution for array values, when I had given you the form input for the keys. That was unintentional. Forgetting to run a query isn't something we can gently point out, so we default back to sarcasm. Speaking of which, you're still not running $closequery, and it's still not inside the isset() check. Kicken's code was a snippet, designed to be INSIDE of the isset() check that I told you to write, and FOLLOWED by something that actually makes use of the variable. Execute the query. If that doesn't work, echo the query to see if it's malformed. If it is, figure out which variable is causing the problem. Echo that variable, print_r($_POST), do something to debug this on your own. You were given the basic structure because (a) I didn't want to actually write the 25 lines of example code for you, and (b) I assumed all you needed was the basic structure, and any error checking, debugging, and running of queries could be done on your own.
  23. $body = "Date Sent: $myDate\n Parent's Name: $ParentsName Best Phone: $BestPhone Email: $Email Student's Name: $StudentsName Student's School: $StudentsSchool\n\n"; if(trim($SATTest1) != "" ) { $body .= $SATTest; } mail( "me@digital.com", "Sign-up Sheet Request", $body, "From: {$Email}" );
  24. This code is way too messy for me to be able to figure it out easily, but aren't those items...outside the loop?
  25. Queries must be run to have any effect.
×
×
  • 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.