Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
[help]undefined variable when saving session data to DB
Jessica replied to Diether's topic in PHP Coding Help
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. -
= is assignment. == is comparison.
-
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.
-
Is there a way to set up an automated printing in PHP?
Jessica replied to eldan88's topic in PHP Coding Help
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. -
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.
-
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.
-
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?
-
Is there a way to set up an automated printing in PHP?
Jessica replied to eldan88's topic in PHP Coding Help
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.) -
MySQL Select less than and other duplicated records
Jessica replied to peterjc's topic in MySQL Help
Are the indexes on the right columns? -
If the table wasn't already UTF-8 when you inserted the data, I don't know that you can convert it back.
-
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.
-
Sounds like the issue is your feed reader. How does it look in Google Reader?
-
You'll need to have your character encoding set to UTF-8, both in MySQL and your PHP generated HTML.
-
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.
-
You echo what you want echoed.... What did you try?
-
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.
-
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.
-
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}"; } }
-
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.
-
Retrieve record, if log entry timestamp is greater than 10 minutes
Jessica replied to PaulRyan's topic in MySQL Help
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 -
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.
-
Retrieve record, if log entry timestamp is greater than 10 minutes
Jessica replied to PaulRyan's topic in MySQL Help
You haven't told us what the problem is... -
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.
-
. $insert = "INSERT INTO archive (firstname, lastname, rank, datefield) VALUES (SELECT firstname, lastname, era, CURDATE() FROM old)";