Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. I didn't say along with a loop, I said rather than. It's fairly obvious from the output what you are doing "wrong". You should brush up on these basic functions
  2. Rather than a loop for the text you could use implode.
  3. True, I was thinking too much about php's automatic type conversions.
  4. You also keep saying he's being rude, belittling, etc. The only thing he said to floridaflatlander was to read the article and understand it. That is in no way rude. He didn't say "You're an idiot because you haven't read this". He didn't say "You should get off the boards, moron". He said that this person does not understand security, and unless floridaflatlander's job is security, this is not an insult.
  5. Where is it in the code though? Just because the column is called post_name, the variable might be $post_name or $postName; or $post, you need to find it in the code.
  6. Read the docs? What you said doesn't make sense. The entire purpose of implode(x, y) is to put X between each string in array Y. That's another way of saying "put the comma on each string while avoiding the last". You can't use implode to remove strings from strings, and it always puts them between, not on the end of each. edit: unless there is a javascript implode that is different. I am talking about php.net/implode.
  7. No, it's not...that's the entire thing you're complaining about, and you just said that when you removed the brackets, it works. Before it was converting your number to a string and getting one character of it, which is what he described. Now, it's not...
  8. is post_name a constant or a variable? defined() is for constants.
  9. Don't put the , on the end of the string in the first place, and then use implode.
  10. So now you're trying to select the max of num, which would be China in your example correct? Try: SELECT COUNT(*) AS num, country.Name FROM country, city WHERE CountryCode = Code GROUP BY country.Name ORDER BY count(*) DESC LIMIT 1
  11. $weight = $weight[$i]; ... $sql =" UPDATE `confirmedorder` SET orderid = '$orderid[$i]', weight=$weight[$i],status='finished', ordervalue='$ordervalue' WHERE customerid = $customerid "; This explains your error. You didn't answer my question but the problem is that you are taking your array and getting the value, then treating that value like an array.
  12. Your query 2 looks almost good but needs to be a left join and I believe the syntax you're using intimates an inner join. Try doing this (not tested) SELECT [same] FROM table a LEFT JOIN table b on a.matchNo = b.matchNo This would get you In your first example, unless you cut off rows, there is no example where clan1 = 1 and clan2 = 3. Do you have a separate table of the clan ids? That is what you'll need I think to get the desired result. Then it would be SELECT a.*, b.* FROM clans a LEFT JOIN clans b on a.clan_id != b.clan_id Would get you the list of clans vs each other.
  13. You need to write this in clear english I think, because you're selecting from two tables and never join them. It's not clear what you're attempting to do. It looks like you're trying to get the count of each country, and then get the maximum from that? AFAIK, you cannot reference a new column name (like num) in your statement, would have to do MAX(COUNT(*)) not MAX(num). But the entire thing looks wrong. Please explain what you're attempting to do, and figure out how to join your tables.
  14. You're sending it to the DB as a string. Remove the single quotes around the variable. Edit: Or, your weight is not an array of numbers but a string, so you're getting each digit separately. print_r($weight); before the loop, what do you get?
  15. Google is free the same way ABC is free. It's free to use search. There are plenty of google products that cost money. If I tell a friend to use gmail, I don't get any money for saying it's a good product. I think you should stop putting words in xpyh's textarea (I couldn't resist) because you're starting to look kind of petty about it.
  16. So do you realize why, if they don't relate to each other, making the IF statement dependent on that won't work? try it with the post_name variable instead.
  17. How does the value of S2MEMBER_CURRENT_USER_LOGIN relate to whether or not they have a page?
  18. That's weird, because that's what you're doing... You have no idea why I laughed when I saw you're using cold fusion. It couldn't possibly be because I've used it in the past, that wouldn't be a possibility at all I guess I'm way too young for that gramps. You did get plenty of advise. You rejected it and got more advice. You rejected THAT and got more advice. Why don't you tell us what you want to hear and someone can c&p it for you. I didn't belittle you for being old, don't assume that because I and most of the people here are younger than you that we don't have a clue what we're talking about. Btw: if you care about statistics regarding language use, this one is MUCH more interesting to me: http://w3techs.com/technologies/overview/programming_language/all Everyone knows that when Al Gore invented the Internet, he had "adult" websites in mind. Google "avenue Q the Internet is for porn" if you want a laugh.
  19. Why do you think it's bad? (what's wrong is the use of "". And you're using array reference instead of object. -> Edit: read too fast. What u did converts the object to a string which is probably fine for what you're doing. It could be better. Theres no way you read all 3 of those doc page that fast. The object one is what's important.
  20. He already knows foreach, he used it appropriately (IMO)
  21. http://us.php.net/print_r http://us.php.net/echo http://us.php.net/manual/en/language.oop5.php
  22. It sounds like the service you offer isn't the service they want. It's always ok to fire a client. It's usually less stressful than trying to make it work. If they paid you enough, you'd be better off outsourcing the project. But just keep in mind when it breaks, you have to fix it or find someone who can and pay them.
×
×
  • 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.