Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. I thought it was a joke for the 't' missing in "shity". Or am I thinking too much?
  2. I agree and it's always nice to see these sort of threads. The staff does a wonderful job here enforcing the rules, taking care of the forums, adding new features, and making this a pleasant and productive place to help and learn. So hats off to you guys and keep up the good work!
  3. It sounds to me like he is attacking the staff as well trolling. I mean, doesn't the title give that away? What kind of responses do you expect? Besides, we're doing the world a favor by teaching this kid some manners. He repeatedly blamed the staff for enforcing the rules or utilizing/altering SMF features (for reasons which have already been stated). So his lack of competence, laziness, carelessness, ignorance (the list goes on...), whichever it may be, to post in the appropriate section and/or read the guidelines and rules, that resulted in staff having to correct them, makes the staff "shity"? Sorry, but I don't agree, and he is one out of thousands that complain every couple months. That's got to hold some sort of value. The fact is, it's impossible to please everyone and people are going to complain. No it does not but if a member is going to lash out like that on the staff, imagine what they would do to regular and/or badged members. If his previous posts, and especially this thread, even remotely reflect his personality, then I'm not sure I would want someone like that around anyway. Besides, he asked to be flamed...
  4. Try something along of the lines of: SELECT CONCAT(Phase, IF(count(*)>1,CONCAT(' x',count(*)),'')) AS new_name FROM [table_name] GROUP BY Phase;
  5. Add GROUP BY p.id to the end of your query. It will total prices for each product rather than all of them.
  6. I assume you're being sarcastic. Personally, I have different levels of passwords depending on the importance of the account, but I definitely don't create a new password for everything.
  7. A few problems I see are: You should alias your table names (ie products p) so you can use 'p' to reference columns. The reason for the error is because I assume 'store' is present in both tables and you have to specify a table. The only time you need backticks is to escape a table or column name due to it being a MySQL keyword. Try something like this: $query = "SELECT SUM(price) AS total, p.id, p.name, p.store FROM products p LEFT JOIN stores s ON p.store = s.store WHERE p.id IN(".join($products,',').")";
  8. Yes, just like any other query. That will put the information into an associative array for you.
  9. Maq

    Query Empty?

    Could you provide more information, like code for example?
  10. I don't see any reason this can't be done directly in your query. You would have to join the 'products' and 'store' tables, and use SUM to total the prices. Ok, how would i go about do that?. And how do i join them? in PHPMYADMIN?, Cheers mate James. No, in your query. Something like this: SELECT SUM(p.price) AS total, p.id AS pid, [s.id AS sid] FROM products p LEFT JOIN store s ON p.id = [s.product_id] WHERE p.id IN (4, 5); (NOTE: Columns with brackets [] surrounding them, are guesses from my part. This has also not been tested.)
  11. Hi mattal999, There's a fulltext search engine called Lucene that would be ideal in your situation and is very scalable. As for the matter at hand, sorry I'm not sure of a good solution.
  12. That's unfortunate because a quick bash script could have solved your problem. If you want to use PHP then you will have to utilize the glob and readdir functionalities.
  13. I don't see any reason this can't be done directly in your query. You would have to join the 'products' and 'store' tables, and use SUM to total the prices.
  14. What kind of platform is you web server on?
  15. Maq

    MySQL Users?

    Hi Canadian, Reading through the MySQL manual should clear up some of your confusion: http://dev.mysql.com/doc/refman/5.1/en/user-account-management.html
  16. Huh...?
  17. Hi FACT10, for future reference, please surround your code with tags. It will increase feedback rate and help others solve your problem.
  18. Hi Vector, Please do not resurrect old threads. This thread is more than a year old (November 07, 2008). If you would like to create a new thread with your question it would result in better feedback and we will be happy to help
  19. Maq

    HI ALL!

    Good idea, but unfortunately, you're right, I do not possess the power to do so.
  20. Maq

    HI ALL!

    I have an idea but it would be more appropriate and you would receive better help if you post in the PHP Coding Help section with some more relevant information.
  21. Maq

    whats prob

    Do this and paste the exact output: $query = "SELECT * FROM `f_chat_mask_users` WHERE `chat_mask_user_user_id`='$memberID' AND `mobilestat` != '1'"; echo $query;
  22. Maq

    whats prob

    The string syntax looks valid. Echo out the cookie value to see what it actually is. Also if the member_id is an integer than you don't need single quotes around it, but that shouldn't cause an error.
  23. There is a comma after r.takeout.
  24. 1) Don't use raw POST data in your query. That's a serious security vulnerability. 2) Check to see if POST has a value by using isset, then you can structure your query appropriately. Remember if you take out the condition that checks for a specific 'id' it will include all ids.
  25. Maq

    HI ALL!

    Hi kcmartz, Welcome to PHPFreaks. I'm sure you'll learn a lot here. BTW I went to take a quick look at your site (kcmartz.com) and was bombarded by a plethora of errors. ie: Warning: fopen(D:\Hosting\4369619\html/cache/lang_index+Modifications_english_Deep_Red_2009_v1-3.php) [function.fopen]: failed to open stream: Permission denied in D:\Hosting\4369619\html\Sources\ManageMaintenance.php on line 1496 Warning: fwrite(): supplied argument is not a valid stream resource in D:\Hosting\4369619\html\Sources\ManageMaintenance.php on line 1498
×
×
  • 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.