Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. As it says, you haven't defined $qty of $itemId. Where are they coming from? However, I can't follow the logic of your code. What are you trying to do? Finally, you should never run queries in loops.
  2. I'd look into using a DOM parser. Regular expressions are terrible for HTML parsing. What you're looking for seems fairly simple, but I personally am horrible at regular expressions and all the PHP functions that go with - but I'd say if the function you're using returns a boolean instead of the value you want... it's the wrong function.
  3. Um, don't try to store the price as a boolean. Boolean means true/false (0/1). If you want anything other than 0/1, you need to change your database field to a type that makes sense...like Decimal(5,2). You may need up to (10,2) or so, not sure how high your prices go.
  4. That's a great option. And buying one that does support it would probably be the cheapest option in terms of time and money, if you want to automate it.
  5. If you want to interact with an existing website, your first step is talking to them and getting info about their API. But it sounds like what you're trying to do is circumvent their shopping cart and let people buy "things" for "free". Sounds like it would be *way* against their TOS. We don't approve of that sort of thing.
  6. As Barand said it doesn't matter. Think about this - you can do a SELECT of something that isn't a column name. Try SELECT 'foo' FROM table. You can select a string you type, you can select CURDATE() or NOW(), you can SELECT 5-2. From a table or not sometimes. You can select them with aliases. It doesn't matter for an insert.
  7. If you must know it's rather condescending. I don't give a shit, it's nicer then when people call me a bitch. I just ignored it. I assume you got help from one of the other forums in the world?
  8. I get free food occasionally by placing an order online and expecting that a human on the other end will do their job correctly. (Hint: humans fail. A lot.)
  9. If the table wasn't already UTF-8 when you inserted the data, I don't know that you can convert it back.
  10. It's probably some settings you have. Usually when you first subscribe to a feed, the reader doesn't show you too many posts. Like google will always only show you the 10 most recent posts in the past, then all new ones as they appear. Try subscribing, then publishing some new posts, like 2 or 4 of them, and see if your mac feed reader shows all the new ones.
  11. Sounds like the issue is your feed reader. How does it look in Google Reader?
  12. You'll need to have your character encoding set to UTF-8, both in MySQL and your PHP generated HTML.
  13. Preview doesn't show up in the quick reply like it used to. I can't remember if it shows up when creating a post, it's been a while since I did.
  14. You echo what you want echoed.... What did you try?
  15. I suggest you read the PHP manual pages about strings, specifically about concatenation, and variable interpolation. I know those are big words but the manual explains them. When you've updated your code, post it and we can help with the remaining bugs.
  16. Yeah I mean I didn't put a line break it in or anything because it was for you to LEARN from and then adjust your code, but it definitely works. It is absolutely NOT possible for the code I posted to output 24:60. (It also needs to have some adjustment to convert the trailing :0 to :00 but yeah.) If you tried changing your code, post your new code. If not, do that first.
  17. What?? Why do you have min15 and min30, but never use min15 or define min30? This is a basic list of the times. for($hour=0; $hour<=23; $hour++){ for($mins=0; $mins<60; $mins=$mins+15){ echo "{$hour}:{$mins}"; } }
  18. Each set will needs it's own name. Variables within single quotes will not be read, you need to use double quotes or string concatenation. And no, you cannot echo within an echo. Please use the code tags when you post, it's easier to read your code that way.
  19. Okay, and the problem IS....? Do you get an error? What is it? Did you try echo'ing your SQL and running it in MySQL or phpMyAdmin? How have you tested the problem is not in PHP? What HAVE you tried? Saying what you want done is nice. But we won't do it for you. I will say you probably don't need to do a subquery to do your left join. I'll look at your tables but answering the first few questions would help. Edit: Barand to the rescue :-P
  20. I was responding to you saying: "c'mon you didn't really expect me to type all this did u?" You want help but your post isn't readable. Make the effort. By the way, our rules DO state you must make an effort. But with our stupid new forum I have no idea what happened to our rules and TOS.
  21. Actually this is better sorry . $insert = "INSERT INTO archive (firstname, lastname, rank, datefield) SELECT firstname, lastname, era, CURDATE() FROM old"; I don't think you can use values the way you were, it'll just do one row.
  22. . $insert = "INSERT INTO archive (firstname, lastname, rank, datefield) VALUES (SELECT firstname, lastname, era, CURDATE() FROM old)";
×
×
  • 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.